1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-24 11:55:50 +01:00

Fix development build not working with bitwarden:// protocol (#1165)

This commit is contained in:
Oscar Hinton 2021-12-07 20:04:52 +00:00 committed by GitHub
parent 5fd1da0c58
commit b70d2fb3c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,14 @@ export class Main {
this.nativeMessagingMain.listen();
}
if (!app.isDefaultProtocolClient('bitwarden')) {
app.removeAsDefaultProtocolClient('bitwarden');
if (process.env.NODE_ENV === 'development' && process.platform === 'win32') {
// Fix development build on Windows requirering a different protocol client
app.setAsDefaultProtocolClient('bitwarden', process.execPath, [
process.argv[1],
path.resolve(process.argv[2]),
]);
} else {
app.setAsDefaultProtocolClient('bitwarden');
}