Skip to content

Commit f0c7cf2

Browse files
more fixes for spaces
1 parent 62b01f9 commit f0c7cf2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

projectGeneratorElectron/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ ipc.on('update', function(event, arg) {
567567
if( arg.platform == 'osx' || arg.platform == 'linux' || arg.platform == 'linux64' ){
568568
pgApp = pgApp.replace(/ /g, '\\ ');
569569
} else {
570-
pgApp = pgApp.replace(/ /g, '^ ');
570+
pgApp = "\"" + pgApp + "\"";
571571
}
572572

573573
var wholeString = pgApp + " " + recursiveString + " " + verboseString + " " + pathString + " " + platformString + " " + updatePath;
@@ -653,7 +653,7 @@ ipc.on('generate', function(event, arg) {
653653
if( arg.platform == 'osx' || arg.platform == 'linux' || arg.platform == 'linux64' ){
654654
pgApp = pgApp.replace(/ /g, '\\ ');
655655
} else {
656-
pgApp = pgApp.replace(/ /g, '^ ');
656+
pgApp = pgApp = "\"" + pgApp + "\"";
657657
}
658658

659659
var wholeString = pgApp + " " + verboseString + " " + pathString + " " + addonString + " " + platformString + " " + projectString;
@@ -807,6 +807,7 @@ ipc.on('launchProjectinIDE', function(event, arg) {
807807
if( arg.platform == 'osx' ){
808808
var osxPath = pathTemp.join(fullPath, arg['projectName'] + '.xcodeproj');
809809
console.log( osxPath );
810+
osxPath = osxPath.replace(/ /g, '\\ ');
810811
if( fsTemp.statSync(osxPath).isDirectory() == true ){ // note: .xcodeproj is a folder, not a file
811812
var exec = require('child_process').exec;
812813
exec('open ' + osxPath, function callback(error, stdout, stderr){
@@ -818,6 +819,7 @@ ipc.on('launchProjectinIDE', function(event, arg) {
818819
}
819820
} else if( arg.platform == 'linux' || arg.platform == 'linux64' ){
820821
var linuxPath = pathTemp.join(fullPath, arg['projectName'] + '.qbs');
822+
linuxPath = linuxPath.replace(/ /g, '\\ ');
821823
console.log( linuxPath );
822824
var exec = require('child_process').exec;
823825
exec('xdg-open ' + linuxPath, function callback(error, stdout, stderr){
@@ -826,6 +828,7 @@ ipc.on('launchProjectinIDE', function(event, arg) {
826828
} else {
827829
var windowsPath = pathTemp.join(fullPath, arg['projectName'] + '.sln');
828830
console.log( windowsPath );
831+
windowsPath = "\"" + windowsPath + "\"";
829832
var exec = require('child_process').exec;
830833
exec('start ' + windowsPath, function callback(error, stdout, stderr){
831834
return;

0 commit comments

Comments
 (0)