mirror of
https://github.com/fiatjaf/nak.git
synced 2024-10-30 09:09:08 -04:00
fix: print prompt to stderr.
This commit is contained in:
parent
bda18e035a
commit
0b9e861f90
|
@ -182,6 +182,7 @@ func promptDecrypt(ncryptsec1 string) (string, error) {
|
||||||
|
|
||||||
func ask(msg string, defaultValue string, shouldAskAgain func(answer string) bool) (string, error) {
|
func ask(msg string, defaultValue string, shouldAskAgain func(answer string) bool) (string, error) {
|
||||||
return _ask(&readline.Config{
|
return _ask(&readline.Config{
|
||||||
|
Stdout: os.Stderr,
|
||||||
Prompt: color.YellowString(msg),
|
Prompt: color.YellowString(msg),
|
||||||
InterruptPrompt: "^C",
|
InterruptPrompt: "^C",
|
||||||
DisableAutoSaveHistory: true,
|
DisableAutoSaveHistory: true,
|
||||||
|
@ -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) {
|
func askPassword(msg string, shouldAskAgain func(answer string) bool) (string, error) {
|
||||||
config := &readline.Config{
|
config := &readline.Config{
|
||||||
|
Stdout: os.Stderr,
|
||||||
Prompt: color.YellowString(msg),
|
Prompt: color.YellowString(msg),
|
||||||
InterruptPrompt: "^C",
|
InterruptPrompt: "^C",
|
||||||
DisableAutoSaveHistory: true,
|
DisableAutoSaveHistory: true,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user