fix(go): protect CLI install credentials
This commit is contained in:
1 parent
4f9108099c
commit
5384565b4f
16 files changed
+1126
-79
No files matched your search
@@ -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()))
|
||||
}
|
||||
Reference in new issue
Block a user