|
|
@ -24,7 +24,6 @@ import (
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
"syscall"
|
|
|
|
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/gofrs/flock"
|
|
|
|
"github.com/gofrs/flock"
|
|
|
@ -117,8 +116,9 @@ func (o *repoAddOptions) run(out io.Writer) error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if o.username != "" && o.password == "" {
|
|
|
|
if o.username != "" && o.password == "" {
|
|
|
|
|
|
|
|
fd := int(os.Stdin.Fd())
|
|
|
|
fmt.Fprint(out, "Password: ")
|
|
|
|
fmt.Fprint(out, "Password: ")
|
|
|
|
password, err := terminal.ReadPassword(syscall.Stdin)
|
|
|
|
password, err := terminal.ReadPassword(fd)
|
|
|
|
fmt.Fprintln(out)
|
|
|
|
fmt.Fprintln(out)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
return err
|
|
|
|