diff --git a/desktop/app/src/chrome/SettingsSheet.tsx b/desktop/app/src/chrome/SettingsSheet.tsx index cb92e81ff..7e7756404 100644 --- a/desktop/app/src/chrome/SettingsSheet.tsx +++ b/desktop/app/src/chrome/SettingsSheet.tsx @@ -80,7 +80,7 @@ class SettingsSheet extends Component { this.props.updateLauncherSettings(this.state.updatedLauncherSettings); this.props.onHide(); flush().then(() => { - restartFlipper(); + restartFlipper(true); }); }; diff --git a/desktop/app/src/utils/restartFlipper.tsx b/desktop/app/src/utils/restartFlipper.tsx index 4b40a3651..241960477 100644 --- a/desktop/app/src/utils/restartFlipper.tsx +++ b/desktop/app/src/utils/restartFlipper.tsx @@ -10,9 +10,18 @@ import {remote} from 'electron'; import isProduction from './isProduction'; -export default function restart() { +export default function restart(update: boolean = false) { if (isProduction()) { - remote.app.relaunch(); + if (update) { + const options = { + args: process.argv + .splice(0, 1) + .filter((arg) => arg !== '--no-launcher' && arg !== '--no-updater'), + }; + remote.app.relaunch(options); + } else { + remote.app.relaunch(); + } remote.app.exit(); } else { // Relaunching the process with the standard way doesn't work in dev mode.