Skip to content

Commit

Permalink
Eliminate the race
Browse files Browse the repository at this point in the history
  • Loading branch information
mashiike committed Jun 11, 2021
1 parent 387ae8b commit 2d5be5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mascaras.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ func (app *App) executePrompt(ctx context.Context, executer executer, dbClusterI
log.Println("[info] Use the `exit` or` abort` command to escape from Prompt.")
log.Println("[info] Enter `help` command for more information.")
log.Println("[info] Note: `^C` behaves the same as the `abort` command.")
l.SetVimMode(false)
for {
select {
case <-ctx.Done():
Expand All @@ -294,7 +295,6 @@ func (app *App) executePrompt(ctx context.Context, executer executer, dbClusterI
return nil
}
line = strings.TrimSpace(line)
l.SetVimMode(false)
switch {
case strings.HasPrefix(line, "help"):
fmt.Fprintln(l.Stderr(), "commands:")
Expand Down

0 comments on commit 2d5be5a

Please sign in to comment.