fix(cli): protect Go install credentials
This commit is contained in:
1 parent
3488ab778c
commit
996672a6a7
16 files changed
+1128
-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