1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 18:23:31 +00:00

chore(dev): Switch to using build constant for isDev check

This commit is contained in:
Justin Baur
2025-09-05 19:12:21 -04:00
committed by GitHub
parent 1a0d3e3ada
commit 7eb89eb45a
7 changed files with 29 additions and 14 deletions

View File

@@ -20,11 +20,7 @@ export function invokeMenu(menu: RendererMenuItem[]) {
}
export function isDev() {
// ref: https://github.com/sindresorhus/electron-is-dev
if ("ELECTRON_IS_DEV" in process.env) {
return parseInt(process.env.ELECTRON_IS_DEV, 10) === 1;
}
return process.defaultApp || /node_modules[\\/]electron[\\/]/.test(process.execPath);
return BIT_ENVIRONMENT === "development";
}
export function isLinux() {