From 8d9698101d56203f3591395498319ea5562014d1 Mon Sep 17 00:00:00 2001 From: Hinton Date: Mon, 4 Jan 2021 20:31:33 +0100 Subject: [PATCH] Adding regedit to src/package.json --- src/main/nativeMessaging.main.ts | 13 +++++++------ src/package.json | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/nativeMessaging.main.ts b/src/main/nativeMessaging.main.ts index 2b400f5655..63c4011ed1 100644 --- a/src/main/nativeMessaging.main.ts +++ b/src/main/nativeMessaging.main.ts @@ -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; } diff --git a/src/package.json b/src/package.json index 68a3f9b9bf..7b4993945a 100644 --- a/src/package.json +++ b/src/package.json @@ -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" } }