Skip to content

Instantly share code, notes, and snippets.

@kroeder
Created August 30, 2022 19:23
Show Gist options
  • Save kroeder/e4ac67f73d7fc03c8355c168518824ce to your computer and use it in GitHub Desktop.
Save kroeder/e4ac67f73d7fc03c8355c168518824ce to your computer and use it in GitHub Desktop.
diff --git a/node_modules/fs-extra/lib/copy/copy.js b/node_modules/fs-extra/lib/copy/copy.js
index 328f102..31cd27b 100644
--- a/node_modules/fs-extra/lib/copy/copy.js
+++ b/node_modules/fs-extra/lib/copy/copy.js
@@ -150,7 +150,7 @@ function onDir (srcStat, destStat, src, dest, opts, cb) {
}
function mkDirAndCopy (srcMode, src, dest, opts, cb) {
- fs.mkdir(dest, err => {
+ fs.mkdir(dest, { recursive: true }, err => {
if (err) return cb(err)
copyDir(src, dest, opts, err => {
if (err) return cb(err)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment