Skip to content

Commit

Permalink
fix: dynamic prompt string not available after CliAsk or CliYesNo
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Mar 29, 2023
1 parent da40df5 commit 85e6eba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/lib/cc/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func CliAsk(prompt string, allow_empty bool) (answer string) {
EmpReadLine.Config.EOFPrompt = ""
EmpReadLine.Config.InterruptPrompt = ""

defer EmpReadLine.SetPrompt(EmpPrompt)
defer SetDynamicPrompt()

var err error
for {
Expand Down Expand Up @@ -443,7 +443,7 @@ func CliYesNo(prompt string) bool {
EmpReadLine.Config.EOFPrompt = ""
EmpReadLine.Config.InterruptPrompt = ""

defer EmpReadLine.SetPrompt(EmpPrompt)
defer SetDynamicPrompt()

answer, err := EmpReadLine.Readline()
if err != nil {
Expand Down

0 comments on commit 85e6eba

Please sign in to comment.