OS X changes

This commit is contained in:
Scott E. Graves
2018-11-07 18:27:33 -06:00
parent 9640a0805c
commit f7574c0815

View File

@@ -174,11 +174,10 @@ module.exports.executeMount = (directory, version, storageType, location, exitCa
} else if (storageType.toLowerCase() === 'siaprime') { } else if (storageType.toLowerCase() === 'siaprime') {
args.push('-sp'); args.push('-sp');
} }
if (os.platform() === 'linux') { if ((os.platform() === 'linux') || (os.platform() === 'darwin')) {
args.push('-o'); args.push('-o');
args.push('big_writes'); args.push('big_writes');
} } else if (os.platform() === 'win32') {
if (os.platform() === 'win32') {
args.push('-hidden'); args.push('-hidden');
} }
args.push(location); args.push(location);
@@ -454,9 +453,11 @@ module.exports.stopProcessByPID = pid => {
windowsHide: true, windowsHide: true,
}; };
const command = (os.platform() === 'win32') ? 'taskkill.exe' : ''; const command = (os.platform() === 'win32') ? 'taskkill.exe' : 'kill';
const args = []; const args = [];
args.push('/PID'); if (os.platform() === 'win32') {
args.push('/PID');
}
args.push(pid); args.push(pid);
const process = new spawn(command, args, processOptions); const process = new spawn(command, args, processOptions);