OSX Interface-running detection fixes

This commit is contained in:
Roxanne Skelly 2018-09-26 18:40:54 -07:00
parent ba1bae6408
commit b6fd302a83
2 changed files with 6 additions and 3 deletions

View file

@ -67,7 +67,11 @@ exports.startInterface = function(url) {
}
exports.isInterfaceRunning = function(done) {
var pInterface = new Process('interface', 'interface.exe');
if (osType == 'Windows_NT') {
var pInterface = new Process('interface', 'interface.exe');
} else if (osType == 'Darwin') {
var pInterface = new Process('interface', 'Interface');
}
return pInterface.isRunning(done);
}

View file

@ -274,8 +274,7 @@ Process.prototype = extend(Process.prototype, {
done(running);
});
} else if (os.type == 'Darwin') {
console.log("TODO IsRunning Darwin");
childProcess.exec('ps cax | grep interface', function (err, stdout, stderr) {
childProcess.exec('ps cax | grep ' + _command, function (err, stdout, stderr) {
done(stdout.length > 0);
});
}