diff --git a/cli_helpers.go b/cli_helpers.go index 8eaf864..d710df4 100644 --- a/cli_helpers.go +++ b/cli_helpers.go @@ -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 { @@ -28,9 +30,9 @@ 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 @@ -38,9 +40,9 @@ func PromptForHiddenInputConfirm() string { 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") } diff --git a/remote/gist/storage.go b/remote/gist/storage.go index 41afaaf..fa39959 100644 --- a/remote/gist/storage.go +++ b/remote/gist/storage.go @@ -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 } }