Skip to content

Commit

Permalink
Allow scripting the terminal in TUF commands
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Cordell <cordell.evan@gmail.com>
  • Loading branch information
ecordell committed May 9, 2017
1 parent 23eceed commit b3135d1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/notary/tuf.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import (
"strings"
"time"

"golang.org/x/crypto/ssh/terminal"

"github.com/Sirupsen/logrus"
"github.com/docker/distribution/registry/client/auth"
"github.com/docker/distribution/registry/client/auth/challenge"
Expand Down Expand Up @@ -814,7 +812,7 @@ type passwordStore struct {

func (ps passwordStore) Basic(u *url.URL) (string, string) {
// if it's not a terminal, don't wait on input
if ps.anonymous || !terminal.IsTerminal(int(os.Stdin.Fd())) {
if ps.anonymous {
return "", ""
}

Expand Down

0 comments on commit b3135d1

Please sign in to comment.