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

Merge pull request #152 from stratisproject/ui

Fix daemon loading when spaces in path
parents be13ebf8 c4c4c946
...@@ -113,15 +113,12 @@ function startApi() { ...@@ -113,15 +113,12 @@ function startApi() {
const exec = require('child_process').exec; const exec = require('child_process').exec;
//Start Breeze Daemon //Start Breeze Daemon
let apiPath = path.join(__dirname, './/assets//daemon//Breeze.Daemon'); let apiPath = path.join(__dirname, '".//assets//daemon//Breeze.Daemon"');
apiPath = apiPath.replace(/ /g, '// ');
if (os.platform() === 'win32') { if (os.platform() === 'win32') {
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) => { }, (error, stdout, stderr) => {
if (error) { if (error) {
......
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