mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-17 20:31:50 +01:00
Fix IPC proxy selection in prod when using ELECTRON_IS_DEV (#11412)
This commit is contained in:
parent
bdf91e24c6
commit
e1d46045e0
@ -331,7 +331,7 @@ export class NativeMessagingMain {
|
||||
const ext = process.platform === "win32" ? ".exe" : "";
|
||||
|
||||
if (isDev()) {
|
||||
return path.join(
|
||||
const devPath = path.join(
|
||||
this.appPath,
|
||||
"..",
|
||||
"desktop_native",
|
||||
@ -339,6 +339,12 @@ export class NativeMessagingMain {
|
||||
"debug",
|
||||
`desktop_proxy${ext}`,
|
||||
);
|
||||
|
||||
// isDev() returns true when using a production build with ELECTRON_IS_DEV=1,
|
||||
// so we need to fall back to the prod binary if the dev binary doesn't exist.
|
||||
if (existsSync(devPath)) {
|
||||
return devPath;
|
||||
}
|
||||
}
|
||||
|
||||
return path.join(path.dirname(this.exePath), `desktop_proxy${ext}`);
|
||||
|
Loading…
Reference in New Issue
Block a user