Windows fixes
This commit is contained in:
20
helpers.js
20
helpers.js
@@ -198,8 +198,6 @@ module.exports.executeMount = (directory, version, storageType, location, noCons
|
||||
clearTimeout(timeout);
|
||||
exitCallback(code, pid);
|
||||
});
|
||||
|
||||
process.unref();
|
||||
});
|
||||
};
|
||||
|
||||
@@ -466,6 +464,22 @@ module.exports.stopMountProcess = (directory, version, storageType) => {
|
||||
Code: code,
|
||||
});
|
||||
});
|
||||
process.unref();
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.stopMountProcessSync = (directory, version, storageType) => {
|
||||
const processOptions = {
|
||||
detached: true,
|
||||
shell: true,
|
||||
windowsHide: true,
|
||||
};
|
||||
|
||||
const command = path.join(directory, version, (os.platform() === 'win32') ? 'repertory.exe' : 'repertory');
|
||||
const args = ['-unmount'];
|
||||
if (Constants.PROVIDER_ARG[storageType.toLowerCase()].length > 0) {
|
||||
args.push(Constants.PROVIDER_ARG[storageType.toLowerCase()]);
|
||||
}
|
||||
|
||||
const process = new spawn(command, args, processOptions);
|
||||
process.unref();
|
||||
};
|
||||
Reference in New Issue
Block a user