reject with error object
This commit is contained in:
parent
d4b776333f
commit
e7f259b683
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ async function resolvePath(file) {
|
|||
return await new Promise((resolve, reject) => {
|
||||
realpath(file, (err, resolvedPath) => {
|
||||
if (err) {
|
||||
reject('resolving path \'' + file + '\' encountered an error >>> ' + err);
|
||||
reject(new Error('resolving path \'' + file + '\' encountered an error >>> ' + err));
|
||||
}
|
||||
resolve(resolvedPath);
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue