(cherry picked from commit 911c0880dd
)
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
This commit is contained in:
parent
ecaa3c8e2f
commit
5fc023c6ef
|
@ -30,7 +30,10 @@ function dirExistsAsync(path) {
|
|||
function mkDirAsync(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
dirExistsAsync(path).then((exists) => {
|
||||
if (!exists) {
|
||||
if (exists) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
fs.mkdir(path, {recursive: true}, (error) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
|
@ -38,7 +41,6 @@ function mkDirAsync(path) {
|
|||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
}).catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue