Fix Unix binary execution
This commit is contained in:
@@ -82,7 +82,7 @@ const _getDefaultRepertoryArgs = (provider, remote) => {
|
|||||||
|
|
||||||
const _getRepertoryExec = version => {
|
const _getRepertoryExec = version => {
|
||||||
return {
|
return {
|
||||||
cmd: (os.platform() === 'win32') ? 'repertory.exe' : 'repertory',
|
cmd: (os.platform() === 'win32') ? 'repertory.exe' : './repertory',
|
||||||
working: path.join(_getDataDirectory(), version),
|
working: path.join(_getDataDirectory(), version),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -288,7 +288,7 @@ module.exports.executeAndWait = (command, ignoreResult) => {
|
|||||||
module.exports.executeAsync = (command, args=[]) => {
|
module.exports.executeAsync = (command, args=[]) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const launchProcess = (count, timeout) => {
|
const launchProcess = (count, timeout) => {
|
||||||
const cmd = path.basename(command);
|
let cmd = path.basename(command);
|
||||||
const working = cmd.length === command.length ? null : command.substr(0, command.length - cmd.length);
|
const working = cmd.length === command.length ? null : command.substr(0, command.length - cmd.length);
|
||||||
let processOptions = {
|
let processOptions = {
|
||||||
detached: true,
|
detached: true,
|
||||||
@@ -296,6 +296,7 @@ module.exports.executeAsync = (command, args=[]) => {
|
|||||||
};
|
};
|
||||||
if (working) {
|
if (working) {
|
||||||
processOptions.cwd = working;
|
processOptions.cwd = working;
|
||||||
|
cmd = './' + cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
const process = new spawn(cmd, args, processOptions);
|
const process = new spawn(cmd, args, processOptions);
|
||||||
|
|||||||
Reference in New Issue
Block a user