From 8679b9e1765b7779208fb1d94a9aaaa9c27f25a5 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Fri, 2 Aug 2019 23:18:46 -0700 Subject: [PATCH] fix: npm_package issue with external files on windows --- internal/npm_package/packager.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/npm_package/packager.js b/internal/npm_package/packager.js index 59db6f3937..3c86b8e788 100644 --- a/internal/npm_package/packager.js +++ b/internal/npm_package/packager.js @@ -96,7 +96,8 @@ function main(args) { } // src like baseDir/my/path is just copied to outDir/my/path - for (src of srcsArg.split(',').filter(s => !!s)) { + for (let src of srcsArg.split(',').filter(s => !!s)) { + src = src.replace(/\\/g, '/'); if (src.startsWith('external/')) { // If srcs is from external workspace drop the external/wksp portion copyWithReplace( @@ -151,6 +152,7 @@ function main(args) { for (pkg of packagesArg.split(',').filter(s => !!s)) { const outDir = outPath(path.dirname(pkg)); function copyRecursive(base, file) { + file = file.replace(/\\/g, '/'); if (fs.lstatSync(path.join(base, file)).isDirectory()) { const files = fs.readdirSync(path.join(base, file)); files.forEach(f => {