From b5c3ee401292016b783e40f4480d1688c4d98a44 Mon Sep 17 00:00:00 2001 From: "Seth W. Klein" Date: Thu, 7 May 2015 23:00:46 -0400 Subject: [PATCH] Default to killing process on exit Also adds support for capitalization variants of "no" to not kill process. --- terminal/terminal.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terminal/terminal.go b/terminal/terminal.go index a927bba8..f5a72512 100644 --- a/terminal/terminal.go +++ b/terminal/terminal.go @@ -132,13 +132,13 @@ 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.ToLower(strings.TrimSpace(answer)) - kill := (answer == "y") + kill := (answer != "n" && answer != "no") err = client.Detach(kill) if err != nil { return err, 1