diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-10-06 15:10:26 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-10-06 15:10:26 +0200 |
| commit | da20724b9f69caa2132d7d0fa93c7d64ecfe1d65 (patch) | |
| tree | e615de7c9b747e46748873aa5cd244a5359cd12a /gui/src/main/command-line-options.ts | |
| parent | 19e36fb3168ed41c5f52806a55ff0e13cc223cbe (diff) | |
| download | mullvadvpn-da20724b9f69caa2132d7d0fa93c7d64ecfe1d65.tar.xz mullvadvpn-da20724b9f69caa2132d7d0fa93c7d64ecfe1d65.zip | |
Simplify command line argument checking
Diffstat (limited to 'gui/src/main/command-line-options.ts')
| -rw-r--r-- | gui/src/main/command-line-options.ts | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gui/src/main/command-line-options.ts b/gui/src/main/command-line-options.ts index 26cb89887a..543a384029 100644 --- a/gui/src/main/command-line-options.ts +++ b/gui/src/main/command-line-options.ts @@ -1,6 +1,17 @@ -export enum CommandLineOptions { +enum CommandLineOptions { showChanges = '--show-changes', disableResetNavigation = '--disable-reset-navigation', // development only disableDevtoolsOpen = '--disable-devtools-open', // development only forwardRendererLog = '--forward-renderer-log', // development only } + +export const SHOULD_SHOW_CHANGES = process.argv.includes(CommandLineOptions.showChanges); +export const SHOULD_DISABLE_RESET_NAVIGATION = process.argv.includes( + CommandLineOptions.disableResetNavigation, +); +export const SHOULD_DISABLE_DEVTOOLS_OPEN = process.argv.includes( + CommandLineOptions.disableDevtoolsOpen, +); +export const SHOULD_FORWARD_RENDERER_LOG = process.argv.includes( + CommandLineOptions.forwardRendererLog, +); |
