windows-debug: IPP loopback printer helper, Print-to-PDF fallback, debug installer, diag script
This commit is contained in:
parent
4f1d90cf64
commit
dc37fa76dc
1 changed files with 1843 additions and 29 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
|
@ -83,6 +84,9 @@ func LoadXVeraeToken() (string, error) {
|
|||
}
|
||||
}
|
||||
// macOS Keychain (generic password, account optional)
|
||||
if runtime.GOOS != "darwin" {
|
||||
return "", fmt.Errorf("no xVerae- token (set XVERAE_TOKEN or create %s)", filepath.Join(home, ".verae", "xverae-token"))
|
||||
}
|
||||
out, err := exec.Command("security", "find-generic-password", "-s", "verae.xVeraeToken", "-w").Output()
|
||||
if err == nil {
|
||||
t := strings.TrimSpace(string(out))
|
||||
|
|
@ -144,6 +148,9 @@ func SaveXVeraeToken(token string) error {
|
|||
return err
|
||||
}
|
||||
// Keychain (best-effort): delete old, add new
|
||||
if runtime.GOOS != "darwin" {
|
||||
return nil
|
||||
}
|
||||
account := os.Getenv("USER")
|
||||
if account == "" {
|
||||
account = "verae"
|
||||
|
|
|
|||
Loading…
Reference in a new issue