Skip to content

Commit

Permalink
fix: print prompt to stderr.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Feb 2, 2024
1 parent bda18e0 commit 0b9e861
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ func promptDecrypt(ncryptsec1 string) (string, error) {

func ask(msg string, defaultValue string, shouldAskAgain func(answer string) bool) (string, error) {
return _ask(&readline.Config{
Stdout: os.Stderr,
Prompt: color.YellowString(msg),
InterruptPrompt: "^C",
DisableAutoSaveHistory: true,
Expand All @@ -190,6 +191,7 @@ func ask(msg string, defaultValue string, shouldAskAgain func(answer string) boo

func askPassword(msg string, shouldAskAgain func(answer string) bool) (string, error) {
config := &readline.Config{
Stdout: os.Stderr,
Prompt: color.YellowString(msg),
InterruptPrompt: "^C",
DisableAutoSaveHistory: true,
Expand Down

0 comments on commit 0b9e861

Please sign in to comment.