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")
|
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)
|
err = os.WriteFile(path+"/com.8bit.bitwarden.json", []byte(manifest), 0444)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -163,7 +163,7 @@ func detectAndInstallBrowsers(startPath string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("Writing new manifest")
|
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)
|
err = os.WriteFile(path+"/com.8bit.bitwarden.json", []byte(manifest), 0444)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -1,26 +1,26 @@
|
|||||||
package browserbiometrics
|
package browserbiometrics
|
||||||
|
|
||||||
const templateMozilla = `{
|
const templateMozilla = `{
|
||||||
"name": "com.8bit.bitwarden",
|
"name": "com.8bit.bitwarden",
|
||||||
"description": "Bitwarden desktop <-> browser bridge",
|
"description": "Bitwarden desktop <-> browser bridge",
|
||||||
"path": "PATH",
|
"path": "@PATH@",
|
||||||
"type": "stdio",
|
"type": "stdio",
|
||||||
"allowed_extensions": [
|
"allowed_extensions": [
|
||||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}"
|
"{446900e4-71c2-419f-a6a7-df9c091e268b}"
|
||||||
]
|
]
|
||||||
}`
|
}`
|
||||||
|
|
||||||
const templateChrome = `{
|
const templateChrome = `{
|
||||||
"name": "com.8bit.bitwarden",
|
"name": "com.8bit.bitwarden",
|
||||||
"description": "Bitwarden desktop <-> browser bridge",
|
"description": "Bitwarden desktop <-> browser bridge",
|
||||||
"path": "PATH",
|
"path": "@PATH@",
|
||||||
"type": "stdio",
|
"type": "stdio",
|
||||||
"allowed_origins": [
|
"allowed_origins": [
|
||||||
"chrome-extension://nngceckbapebfimnlniiiahkandclblb/",
|
"chrome-extension://nngceckbapebfimnlniiiahkandclblb/",
|
||||||
"chrome-extension://jbkfoedolllekgbhcbcoahefnbanhhlh/",
|
"chrome-extension://jbkfoedolllekgbhcbcoahefnbanhhlh/",
|
||||||
"chrome-extension://ccnckbpmaceehanjmeomladnmlffdjgn/"
|
"chrome-extension://ccnckbpmaceehanjmeomladnmlffdjgn/"
|
||||||
]
|
]
|
||||||
}`
|
}`
|
||||||
|
|
||||||
const proxyScript = `#!/usr/bin/env bash
|
const proxyScript = `#!/usr/bin/env bash
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user