Skip to content

Commit

Permalink
Fix 1.7 and new deps bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
tcr-ableton committed Aug 13, 2016
1 parent 7f2dcf5 commit 382cc64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions cli_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const errorMsg string = "Passphrase error occurred. Exiting..."
// to ask the user for password or passphrase
func PromptForHiddenInput(msg string) string {
fmt.Printf(msg)
return string(gopass.GetPasswd())
pass, _ := gopass.GetPasswd()

return string(pass)
}

func PromptForHiddenInputConfirm() string {
Expand All @@ -28,19 +30,19 @@ func PromptForHiddenInputConfirm() string {
}

fmt.Printf(passPhraseMsg)
inputPass := string(gopass.GetPasswd())
inputPass, _ := gopass.GetPasswd()

if inputPass == "" {
if string(inputPass) == "" {
fmt.Printf("Empty passphrase not allowed\n\n")
i++
continue
}

fmt.Printf(confirmMsg)

confirmPass := string(gopass.GetPasswd())
if inputPass == confirmPass {
return inputPass
confirmPass, _ := gopass.GetPasswd()
if string(inputPass) == string(confirmPass) {
return string(inputPass)
} else {
fmt.Printf("Passphrases did not match. Please try again\n\n")
}
Expand Down
2 changes: 1 addition & 1 deletion remote/gist/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (gs *GistStorage) Pull(remotePath, localPath string) (err error) {
for _, g := range gists {
for k, _ := range g.Files {
if string(k) == remotePath {
gist = &g
gist = g
break
}
}
Expand Down

0 comments on commit 382cc64

Please sign in to comment.