Browse Source

Make sure prompt looks good in interactive mode

pull/1782/head
Ethan Frey 7 years ago
parent
commit
a944bdebfc
2 changed files with 4 additions and 1 deletions
  1. +1
    -1
      cmd/recover.go
  2. +3
    -0
      cmd/utils.go

+ 1
- 1
cmd/recover.go View File

@ -39,7 +39,7 @@ func runRecoverCmd(cmd *cobra.Command, args []string) error {
} }
// not really a password... huh? // not really a password... huh?
seed, err := getSeed("Enter your recovery seed phrase")
seed, err := getSeed("Enter your recovery seed phrase:")
if err != nil { if err != nil {
return err return err
} }


+ 3
- 0
cmd/utils.go View File

@ -77,6 +77,9 @@ func getPassword(prompt string) (pass string, err error) {
} }
func getSeed(prompt string) (seed string, err error) { func getSeed(prompt string) (seed string, err error) {
if inputIsTty() {
fmt.Println(prompt)
}
seed, err = stdinPassword() seed, err = stdinPassword()
seed = strings.TrimSpace(seed) seed = strings.TrimSpace(seed)
return return


Loading…
Cancel
Save