Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mkdirp dev dep #85

Open
guimard opened this issue Oct 27, 2020 · 0 comments
Open

Update mkdirp dev dep #85

guimard opened this issue Oct 27, 2020 · 0 comments

Comments

@guimard
Copy link

guimard commented Oct 27, 2020

This simple patch seems enough:

--- a/test/write.test.js
+++ b/test/write.test.js
@@ -25,8 +25,7 @@
             var dest2 = path.join(__dirname,'tmp', 'aync-copy',name);
             mkdirp.sync(path.dirname(dest));
             mkdirp.sync(path.dirname(dest2));
-            mkdirp(path.dirname(dest), function(err) {
-                if (err) throw err;
+            mkdirp(path.dirname(dest)).then(() => {
                 if (path.extname(name)) {
                     zf.readFile(name, function(err, buffer) {
                         if (err) throw err;
@@ -48,6 +47,8 @@
                         });
                     });
                 }
+            }).catch( err => {
+                throw err;
             });
         });
     });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant