Commit c4c4c946 authored by dev0tion's avatar dev0tion

Fix daemon loading when spaces in path

parent 6af1ba3b
...@@ -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