Replace @PATH@, cleanup formatting a bit
This makes it easier to replace the path to the script in NixOS
This commit is contained in:
parent
91612b9d26
commit
c134a0e61d
|
@ -130,7 +130,7 @@ func detectAndInstallBrowsers(startPath string) error {
|
|||
}
|
||||
|
||||
fmt.Println("Writing new manifest")
|
||||
manifest := strings.Replace(templateMozilla, "PATH", path+"/goldwarden-proxy.sh", 1)
|
||||
manifest := strings.Replace(templateMozilla, "@PATH@", path+"/goldwarden-proxy.sh", 1)
|
||||
err = os.WriteFile(path+"/com.8bit.bitwarden.json", []byte(manifest), 0444)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -163,7 +163,7 @@ func detectAndInstallBrowsers(startPath string) error {
|
|||
}
|
||||
|
||||
fmt.Println("Writing new manifest")
|
||||
manifest := strings.Replace(templateChrome, "PATH", path+"/goldwarden-proxy.sh", 1)
|
||||
manifest := strings.Replace(templateChrome, "@PATH@", path+"/goldwarden-proxy.sh", 1)
|
||||
err = os.WriteFile(path+"/com.8bit.bitwarden.json", []byte(manifest), 0444)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
package browserbiometrics
|
||||
|
||||
const templateMozilla = `{
|
||||
"name": "com.8bit.bitwarden",
|
||||
"description": "Bitwarden desktop <-> browser bridge",
|
||||
"path": "PATH",
|
||||
"type": "stdio",
|
||||
"allowed_extensions": [
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}"
|
||||
]
|
||||
"name": "com.8bit.bitwarden",
|
||||
"description": "Bitwarden desktop <-> browser bridge",
|
||||
"path": "@PATH@",
|
||||
"type": "stdio",
|
||||
"allowed_extensions": [
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}"
|
||||
]
|
||||
}`
|
||||
|
||||
const templateChrome = `{
|
||||
"name": "com.8bit.bitwarden",
|
||||
"description": "Bitwarden desktop <-> browser bridge",
|
||||
"path": "PATH",
|
||||
"path": "@PATH@",
|
||||
"type": "stdio",
|
||||
"allowed_origins": [
|
||||
"chrome-extension://nngceckbapebfimnlniiiahkandclblb/",
|
||||
"chrome-extension://jbkfoedolllekgbhcbcoahefnbanhhlh/",
|
||||
"chrome-extension://ccnckbpmaceehanjmeomladnmlffdjgn/"
|
||||
"chrome-extension://nngceckbapebfimnlniiiahkandclblb/",
|
||||
"chrome-extension://jbkfoedolllekgbhcbcoahefnbanhhlh/",
|
||||
"chrome-extension://ccnckbpmaceehanjmeomladnmlffdjgn/"
|
||||
]
|
||||
}`
|
||||
}`
|
||||
|
||||
const proxyScript = `#!/usr/bin/env bash
|
||||
|
||||
|
|
Loading…
Reference in New Issue