Skip to content

Commit 5f7f4d0

Browse files
author
Felix Rieseberg
authored
Fix: Create target directory when copying (#1030)
Fix: Allow building with space in path
1 parent 0092d43 commit 5f7f4d0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

deps/copy.js

+7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ for (const { filename, optional } of files) {
2121
if (optional && !fs.existsSync(path.join(source, filename))) {
2222
continue;
2323
}
24+
2425
fs.accessSync(path.join(source, filename));
26+
27+
// Ensure destination folder exists
28+
const destFolder = path.dirname(path.join(dest, filename));
29+
fs.mkdirSync(destFolder, { recursive: true });
30+
31+
// Copy file over
2532
fs.copyFileSync(path.join(source, filename), path.join(dest, filename));
2633
}

0 commit comments

Comments
 (0)