Commit fd4a8096 authored by Pieterjan Vanhoof's avatar Pieterjan Vanhoof Committed by GitHub

Merge pull request #147 from Daegalus/fix_spaces

Fix handling spaces in path to Breeze Daemon
parents bc353f30 03577687
...@@ -115,14 +115,19 @@ function startApi() { ...@@ -115,14 +115,19 @@ function startApi() {
apipath = path.join(__dirname, '.\\assets\\daemon\\Breeze.Daemon.exe'); apipath = path.join(__dirname, '.\\assets\\daemon\\Breeze.Daemon.exe');
} }
//Handle spaces in paths
apipath = apipath.replace(/ /g, '\\ ');
apiProcess = exec(apipath + ' light -testnet', { apiProcess = exec(apipath + ' light -testnet', {
detached: true detached: true
}); }, (error, stdout, stderr) => {
if (error) {
apiProcess.stdout.on('data', (data) => { writeLogError(`exec error: ${error}`);
writeLog(`stdout: ${data}`); return;
if (mainWindow == null) { }
createWindow(); if (serve) {
writeLog(`stdout: ${stdout}`);
writeLog(`stderr: ${stderr}`);
} }
}); });
} }
...@@ -159,3 +164,7 @@ if (os.platform() === 'win32') { ...@@ -159,3 +164,7 @@ if (os.platform() === 'win32') {
function writeLog(msg) { function writeLog(msg) {
console.log(msg); console.log(msg);
}; };
function writeLogError(msg) {
console.error(msg);
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment