OS X changes
This commit is contained in:
16
helpers.js
16
helpers.js
@@ -123,7 +123,7 @@ module.exports.executeAsync = (command, args=[]) => {
|
||||
const launchProcess = (count, timeout) => {
|
||||
const processOptions = {
|
||||
detached: true,
|
||||
shell: true,
|
||||
shell: false,
|
||||
};
|
||||
|
||||
const process = new spawn(command, args, processOptions);
|
||||
@@ -160,7 +160,7 @@ module.exports.executeMount = (directory, version, storageType, location, noCons
|
||||
return new Promise((resolve) => {
|
||||
const processOptions = {
|
||||
detached: false,
|
||||
shell: true,
|
||||
shell: os.platform() !== 'darwin',
|
||||
stdio: 'ignore',
|
||||
};
|
||||
|
||||
@@ -340,7 +340,7 @@ module.exports.getMissingDependencies = dependencies => {
|
||||
} else {
|
||||
for (const dep of dependencies) {
|
||||
try {
|
||||
if (!fs.lstatSync(dep.file).isFile()) {
|
||||
if (!(fs.lstatSync(dep.file).isFile() || fs.lstatSync(dep.file).isSymbolicLink())) {
|
||||
missing.push(dep);
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -442,8 +442,8 @@ module.exports.setConfigValue = (name, value, directory, storageType, version) =
|
||||
module.exports.stopMountProcess = (directory, version, storageType) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const processOptions = {
|
||||
detached: false,
|
||||
shell: true,
|
||||
detached: os.platform() === 'darwin',
|
||||
shell: os.platform() !== 'darwin',
|
||||
windowsHide: true,
|
||||
};
|
||||
|
||||
@@ -464,13 +464,17 @@ module.exports.stopMountProcess = (directory, version, storageType) => {
|
||||
Code: code,
|
||||
});
|
||||
});
|
||||
|
||||
if (os.platform() === 'darwin') {
|
||||
process.unref();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.stopMountProcessSync = (directory, version, storageType) => {
|
||||
const processOptions = {
|
||||
detached: true,
|
||||
shell: true,
|
||||
shell: os.platform() !== 'darwin',
|
||||
windowsHide: true,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user