From ffacf30722557dfbba6a05abf9ca7f7c038a2b96 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 24 Feb 2019 04:52:07 +0000 Subject: [PATCH] Allow disabling update mechanism Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- electron_app/src/electron-main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/electron_app/src/electron-main.js b/electron_app/src/electron-main.js index 12203e79..25caddb2 100644 --- a/electron_app/src/electron-main.js +++ b/electron_app/src/electron-main.js @@ -147,6 +147,7 @@ ipcMain.on('ipcCall', async function(ev, payload) { } else { mainWindow.focus(); } + break; case 'origin_migrate': migratingOrigin = true; await migrateFromOldOrigin(); @@ -262,10 +263,12 @@ app.on('ready', () => { path: absTarget, }); }, (error) => { - if (error) console.error('Failed to register protocol') + if (error) console.error('Failed to register protocol'); }); - if (vectorConfig['update_base_url']) { + if (argv['no-update']) { + console.log('Auto update disabled via command line flag "--no-update"'); + } else if (vectorConfig['update_base_url']) { console.log(`Starting auto update with base URL: ${vectorConfig['update_base_url']}`); updater.start(vectorConfig['update_base_url']); } else {