[RetainAsar] Don't try on non-Win, don't try if matching asar

This commit is contained in:
Ducko 2021-12-11 15:59:37 +00:00
parent 17ce37f858
commit 2eb71e71a6
2 changed files with 10 additions and 1 deletions

View file

@ -4,7 +4,14 @@ const retainAsar = require('./retainAsar');
exports.install = (callback) => { callback(); };
exports.update = (callback) => {
retainAsar();
if (process.platform === 'win32') {
try {
retainAsar();
} catch (e) {
log('RetainAsar', 'Error', e);
}
}
callback();
};
exports.uninstall = (callback) => { callback(); };

View file

@ -14,6 +14,8 @@ module.exports = () => {
const nextAsarPath = join(nextAppResources, 'app.asar');
const backupAsarPath = join(nextAppResources, 'app.asar.backup');
if (nextAsarPath === currentAsarPath) return;
log('RetainAsar', `Paths:
Install Dir: ${installDir}
Next App Dir: ${nextAppDir}