Fix additional build errors
This commit is contained in:
parent
257b911e00
commit
032da6cdf1
|
@ -9,7 +9,7 @@ import (
|
||||||
func CheckBiometrics(approvalType Approval) bool {
|
func CheckBiometrics(approvalType Approval) bool {
|
||||||
ok, err := touchid.Authenticate(approvalType.String())
|
ok, err := touchid.Authenticate(approvalType.String())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Error(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
if ok {
|
if ok {
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
//go:build linux
|
||||||
|
|
||||||
|
package setup
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/quexten/goldwarden/agent/config"
|
||||||
|
"github.com/quexten/goldwarden/cmd"
|
||||||
|
)
|
||||||
|
|
||||||
|
func VerifySetup(runtimeConfig config.RuntimeConfig) bool {
|
||||||
|
if !cmd.IsPolkitSetup() && !runtimeConfig.DisableAuth {
|
||||||
|
fmt.Println("Polkit is not setup. Run 'goldwarden setup polkit' to set it up.")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
//go:build !linux
|
||||||
|
|
||||||
|
package setup
|
||||||
|
|
||||||
|
import "github.com/quexten/goldwarden/agent/config"
|
||||||
|
|
||||||
|
func VerifySetup(runtimeConfig config.RuntimeConfig) bool {
|
||||||
|
return true
|
||||||
|
}
|
8
main.go
8
main.go
|
@ -1,13 +1,12 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/quexten/goldwarden/agent/config"
|
"github.com/quexten/goldwarden/agent/config"
|
||||||
"github.com/quexten/goldwarden/browserbiometrics"
|
"github.com/quexten/goldwarden/browserbiometrics"
|
||||||
|
"github.com/quexten/goldwarden/client/setup"
|
||||||
"github.com/quexten/goldwarden/cmd"
|
"github.com/quexten/goldwarden/cmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -57,9 +56,8 @@ func main() {
|
||||||
os.Setenv("GOLDWARDEN_SYSTEM_AUTH_DISABLED", "true")
|
os.Setenv("GOLDWARDEN_SYSTEM_AUTH_DISABLED", "true")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !cmd.IsPolkitSetup() && !runtimeConfig.DisableAuth {
|
if !setup.VerifySetup(runtimeConfig) {
|
||||||
fmt.Println("Polkit is not setup. Run 'goldwarden setup polkit' to set it up.")
|
return
|
||||||
time.Sleep(3 * time.Second)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.Execute(runtimeConfig)
|
cmd.Execute(runtimeConfig)
|
||||||
|
|
Loading…
Reference in New Issue