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() {
const exec = require('child_process').exec;
//Start Breeze Daemon
let apiPath = path.join(__dirname, './/assets//daemon//Breeze.Daemon');
apiPath = apiPath.replace(/ /g, '// ');
let apiPath = path.join(__dirname, '".//assets//daemon//Breeze.Daemon"');
if (os.platform() === 'win32') {
apiPath = path.join(__dirname, '.\\assets\\daemon\\Breeze.Daemon.exe');
//Handle spaces in paths
apiPath = apiPath.replace(/ /g, '\\ ');
apiPath = path.join(__dirname, '".\\assets\\daemon\\Breeze.Daemon.exe"');
}
apiProcess = exec(apiPath + ' light -testnet', {
apiProcess = exec('"' + apiPath + '" light -testnet', {
detached: true
}, (error, stdout, stderr) => {
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