only appimage supports autoupdates on linux
This commit is contained in:
parent
c46acc78ce
commit
afa2112d91
|
@ -2,11 +2,15 @@ import {
|
||||||
dialog,
|
dialog,
|
||||||
Menu,
|
Menu,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
|
shell,
|
||||||
} from 'electron';
|
} from 'electron';
|
||||||
import { autoUpdater } from 'electron-updater';
|
import { autoUpdater } from 'electron-updater';
|
||||||
|
|
||||||
import { Main } from '../main';
|
import { Main } from '../main';
|
||||||
import { isDev } from '../scripts/utils';
|
import {
|
||||||
|
isDev,
|
||||||
|
isAppImage,
|
||||||
|
} from '../scripts/utils';
|
||||||
|
|
||||||
const UpdaterCheckInitalDelay = 5 * 1000; // 5 seconds
|
const UpdaterCheckInitalDelay = 5 * 1000; // 5 seconds
|
||||||
const UpdaterCheckInterval = 12 * 60 * 60 * 1000; // 12 hours
|
const UpdaterCheckInterval = 12 * 60 * 60 * 1000; // 12 hours
|
||||||
|
@ -103,6 +107,14 @@ export class UpdaterMain {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.platform === 'linux' && !isAppImage()) {
|
||||||
|
if (withFeedback) {
|
||||||
|
shell.openExternal('https://github.com/bitwarden/desktop/releases');
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.doingUpdateCheckWithFeedback = withFeedback;
|
this.doingUpdateCheckWithFeedback = withFeedback;
|
||||||
if (withFeedback) {
|
if (withFeedback) {
|
||||||
autoUpdater.autoDownload = false;
|
autoUpdater.autoDownload = false;
|
||||||
|
|
|
@ -5,3 +5,7 @@ export function isDev() {
|
||||||
}
|
}
|
||||||
return (process.defaultApp || /node_modules[\\/]electron[\\/]/.test(process.execPath));
|
return (process.defaultApp || /node_modules[\\/]electron[\\/]/.test(process.execPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isAppImage() {
|
||||||
|
return 'APPIMAGE' in process.env;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue