#36: Add ability to select Linux distribution type if OS is unsupported
This commit is contained in:
@@ -705,6 +705,23 @@ module.exports.stopMountProcessSync = (version, provider) => {
|
||||
process.unref();
|
||||
};
|
||||
|
||||
module.exports.testRepertoryBinary = version => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const command = path.join(_getDataDirectory(), version, (os.platform() === 'win32') ? 'repertory.exe' : 'repertory');
|
||||
_executeProcess(command, ['-dc'])
|
||||
.then(code => {
|
||||
if (code === 0) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(Error('Invalid exit code: ' + code));
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.verifyHash = (file, hash) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const platform = os.platform();
|
||||
|
||||
Reference in New Issue
Block a user