fix(go): protect CLI install credentials

This commit is contained in:
ZacharyZhang-NY committed 2026-07-20 00:23:03 -04:00
1 parent 4f9108099c
commit 5384565b4f
16 files changed
+1126 -79

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
//go:build !windows
package main
import (
"os"
"golang.org/x/term"
)
func isInteractiveTerminal(file *os.File) bool {
return term.IsTerminal(int(file.Fd()))
}
func readHiddenLine(file *os.File) ([]byte, error) {
return term.ReadPassword(int(file.Fd()))
}