OS X changes

This commit is contained in:
Scott E. Graves
2018-12-11 20:52:59 -06:00
parent daa46fd9d7
commit 0e5dc5d16a
2 changed files with 38 additions and 23 deletions

View File

@@ -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,
};