Skip to content

Commit 62b01f9

Browse files
fix for windows spaces, needs testing
1 parent 7123f96 commit 62b01f9

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

projectGeneratorElectron/index.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,12 @@ ipc.on('update', function(event, arg) {
564564
var pgApp = pathTemp.normalize(pathTemp.join(pathTemp.join(__dirname, "app"), "projectGenerator"));
565565

566566

567-
pgApp = pgApp.replace(/ /g, '\\ ');
568-
567+
if( arg.platform == 'osx' || arg.platform == 'linux' || arg.platform == 'linux64' ){
568+
pgApp = pgApp.replace(/ /g, '\\ ');
569+
} else {
570+
pgApp = pgApp.replace(/ /g, '^ ');
571+
}
572+
569573
var wholeString = pgApp + " " + recursiveString + " " + verboseString + " " + pathString + " " + platformString + " " + updatePath;
570574

571575
exec(wholeString, function callback(error, stdout, stderr) {
@@ -646,7 +650,11 @@ ipc.on('generate', function(event, arg) {
646650
pgApp = pathTemp.normalize(pathTemp.join(pathTemp.join(__dirname, "app"), "projectGenerator"));
647651
}
648652

649-
pgApp = pgApp.replace(/ /g, '\\ ');
653+
if( arg.platform == 'osx' || arg.platform == 'linux' || arg.platform == 'linux64' ){
654+
pgApp = pgApp.replace(/ /g, '\\ ');
655+
} else {
656+
pgApp = pgApp.replace(/ /g, '^ ');
657+
}
650658

651659
var wholeString = pgApp + " " + verboseString + " " + pathString + " " + addonString + " " + platformString + " " + projectString;
652660

0 commit comments

Comments
 (0)