Add default answer hint to kill process prompt
Also supports capitalized answers.
This commit is contained in:
parent
b24abcd325
commit
31658f37dc
@ -132,11 +132,11 @@ func handleExit(client service.Client, t *Term) (error, int) {
|
||||
}
|
||||
}
|
||||
|
||||
answer, err := t.line.Prompt("Would you like to kill the process? [y/n] ")
|
||||
answer, err := t.line.Prompt("Would you like to kill the process? [y/N] ")
|
||||
if err != nil {
|
||||
return io.EOF, 2
|
||||
}
|
||||
answer = strings.TrimSuffix(answer, "\n")
|
||||
answer = strings.ToLower(strings.TrimSpace(answer))
|
||||
|
||||
kill := (answer == "y")
|
||||
err = client.Detach(kill)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user