#36: Add ability to select Linux distribution type if OS is unsupported

This commit is contained in:
2019-08-28 21:20:30 -05:00
parent 0105602a44
commit 083b2192d7
5 changed files with 44 additions and 5 deletions

View File

@@ -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();