From afa2112d9160a3168ae87f4f4e6f406ae0b9c9cc Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 16 Feb 2018 12:13:36 -0500 Subject: [PATCH] only appimage supports autoupdates on linux --- src/main/updater.main.ts | 14 +++++++++++++- src/scripts/utils.ts | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/updater.main.ts b/src/main/updater.main.ts index ac1fe08359..4b96605e6e 100644 --- a/src/main/updater.main.ts +++ b/src/main/updater.main.ts @@ -2,11 +2,15 @@ import { dialog, Menu, MenuItem, + shell, } from 'electron'; import { autoUpdater } from 'electron-updater'; import { Main } from '../main'; -import { isDev } from '../scripts/utils'; +import { + isDev, + isAppImage, +} from '../scripts/utils'; const UpdaterCheckInitalDelay = 5 * 1000; // 5 seconds const UpdaterCheckInterval = 12 * 60 * 60 * 1000; // 12 hours @@ -103,6 +107,14 @@ export class UpdaterMain { return; } + if (process.platform === 'linux' && !isAppImage()) { + if (withFeedback) { + shell.openExternal('https://github.com/bitwarden/desktop/releases'); + } + + return; + } + this.doingUpdateCheckWithFeedback = withFeedback; if (withFeedback) { autoUpdater.autoDownload = false; diff --git a/src/scripts/utils.ts b/src/scripts/utils.ts index b4fe394889..7da7b85a0d 100644 --- a/src/scripts/utils.ts +++ b/src/scripts/utils.ts @@ -5,3 +5,7 @@ export function isDev() { } return (process.defaultApp || /node_modules[\\/]electron[\\/]/.test(process.execPath)); } + +export function isAppImage() { + return 'APPIMAGE' in process.env; +}