Skip to content

Commit

Permalink
fix: npm_package issue with external files on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Aug 6, 2019
1 parent 31aa1a6 commit 8679b9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/npm_package/packager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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 => {
Expand Down

0 comments on commit 8679b9e

Please sign in to comment.