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

Merge pull request #634 from Hinton/hotifx/desktop-regedit

Add regedit to package.json
This commit is contained in:
Chad Scharf 2021-01-04 15:05:57 -05:00 committed by GitHub
commit 6088f6246f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -80,25 +80,25 @@ export class NativeMessagingMain {
this.writeManifest(path.join(destination, 'firefox.json'), firefoxJson);
this.writeManifest(path.join(destination, 'chrome.json'), chromeJson);
this.createWindowsRegistry('HKLM\\SOFTWARE\\Mozilla\\Firefox', 'HKCU\\SOFTWARE\\Mozilla\\NativeMessagingHosts\\com.8bit.bitwarden', path.join(destination, 'firefox.json'))
this.createWindowsRegistry('HKCU\\SOFTWARE\\Google\\Chrome', 'HKCU\\SOFTWARE\\Google\\Chrome\\NativeMessagingHosts\\com.8bit.bitwarden', path.join(destination, 'chrome.json'))
this.createWindowsRegistry('HKLM\\SOFTWARE\\Mozilla\\Firefox', 'HKCU\\SOFTWARE\\Mozilla\\NativeMessagingHosts\\com.8bit.bitwarden', path.join(destination, 'firefox.json'));
this.createWindowsRegistry('HKCU\\SOFTWARE\\Google\\Chrome', 'HKCU\\SOFTWARE\\Google\\Chrome\\NativeMessagingHosts\\com.8bit.bitwarden', path.join(destination, 'chrome.json'));
break;
case 'darwin':
if (existsSync(`${homedir()}/Library/Application\ Support/Mozilla/`)) {
this.writeManifest(`${homedir()}/Library/Application\ Support/Mozilla/NativeMessagingHosts/com.8bit.bitwarden.json`, firefoxJson)
this.writeManifest(`${homedir()}/Library/Application\ Support/Mozilla/NativeMessagingHosts/com.8bit.bitwarden.json`, firefoxJson);
}
if (existsSync(`${homedir()}/Library/Application\ Support/Google/Chrome`)) {
this.writeManifest(`${homedir()}/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.8bit.bitwarden.json`, chromeJson)
this.writeManifest(`${homedir()}/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.8bit.bitwarden.json`, chromeJson);
}
break;
case 'linux':
if (existsSync(`${homedir()}/.mozilla/`)) {
this.writeManifest(`${homedir()}/.mozilla/native-messaging-hosts/com.8bit.bitwarden.json`, firefoxJson)
this.writeManifest(`${homedir()}/.mozilla/native-messaging-hosts/com.8bit.bitwarden.json`, firefoxJson);
}
if (existsSync(`${homedir()}/.config/google-chrome/`)) {
this.writeManifest(`${homedir()}/.config/google-chrome/NativeMessagingHosts/com.8bit.bitwarden.json`, chromeJson)
this.writeManifest(`${homedir()}/.config/google-chrome/NativeMessagingHosts/com.8bit.bitwarden.json`, chromeJson);
}
break;
default:
@ -167,6 +167,7 @@ export class NativeMessagingMain {
try {
await list(check)
} catch {
this.logService.warning(`Not finding registry ${check} skipping.`);
return;
}

View File

@ -21,6 +21,7 @@
"forcefocus": "^1.1.0",
"keytar": "4.13.0",
"node-ipc": "^9.1.1",
"regedit": "^3.0.3",
"zxcvbn": "4.4.2"
}
}