Merge pull request #757 from aimuz/patch-1

fix: Edge supported by biometrics
This commit is contained in:
Chad Scharf 2021-03-10 10:20:06 -05:00 committed by GitHub
commit 96e8d712ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View File

@ -12,6 +12,7 @@
<array>
<string>/Library/Application Support/Mozilla/NativeMessagingHosts/</string>
<string>/Library/Application Support/Google/Chrome/NativeMessagingHosts/</string>
<string>/Library/Application Support/Microsoft Edge/NativeMessagingHosts/</string>
</array>
</dict>
</plist>

View File

@ -98,6 +98,12 @@ export class NativeMessagingMain {
} else {
this.logService.warning(`Chrome not found skipping.`);
}
if (existsSync(`${this.homedir()}/Library/Application\ Support/Microsoft\ Edge/NativeMessagingHosts`)) {
this.writeManifest(`${this.homedir()}/Library/Application\ Support/Microsoft\ Edge/NativeMessagingHosts/com.8bit.bitwarden.json`, chromeJson);
} else {
this.logService.warning(`Microsoft Edge not found skipping.`);
}
break;
case 'linux':
if (existsSync(`${this.homedir()}/.mozilla/`)) {
@ -107,6 +113,10 @@ export class NativeMessagingMain {
if (existsSync(`${this.homedir()}/.config/google-chrome/`)) {
this.writeManifest(`${this.homedir()}/.config/google-chrome/NativeMessagingHosts/com.8bit.bitwarden.json`, chromeJson);
}
if (existsSync(`${this.homedir()}/.config/microsoft-edge/`)) {
this.writeManifest(`${this.homedir()}/.config/microsoft-edge/NativeMessagingHosts/com.8bit.bitwarden.json`, chromeJson);
}
break;
default:
break;
@ -127,7 +137,11 @@ export class NativeMessagingMain {
}
if (existsSync(`${this.homedir()}/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.8bit.bitwarden.json`)) {
fs.unlink(`${this.homedir()}/Library/Application\ Support/Mozilla/NativeMessagingHosts/com.8bit.bitwarden.json`);
fs.unlink(`${this.homedir()}/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.8bit.bitwarden.json`);
}
if (existsSync(`${this.homedir()}/Library/Application\ Support/Microsoft\ Edge/NativeMessagingHosts/com.8bit.bitwarden.json`)) {
fs.unlink(`${this.homedir()}/Library/Application\ Support/Microsoft\ Edge/NativeMessagingHosts/com.8bit.bitwarden.json`);
}
break;
case 'linux':
@ -138,6 +152,10 @@ export class NativeMessagingMain {
if (existsSync(`${this.homedir()}/.config/google-chrome/NativeMessagingHosts/com.8bit.bitwarden.json`)) {
fs.unlink(`${this.homedir()}/.config/google-chrome/NativeMessagingHosts/com.8bit.bitwarden.json`);
}
if (existsSync(`${this.homedir()}/.config/microsoft-edge/NativeMessagingHosts/com.8bit.bitwarden.json`)) {
fs.unlink(`${this.homedir()}/.config/microsoft-edge/NativeMessagingHosts/com.8bit.bitwarden.json`);
}
break;
default:
break;