Skip to content

Commit

Permalink
Merge pull request #236 from Lowercases/master
Browse files Browse the repository at this point in the history
Move the signal setup closer to cmd.Start()
  • Loading branch information
lox committed Mar 28, 2018
2 parents cbfcc50 + af629ad commit 3c73304
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func ConfigureExecCommand(app *kingpin.Application) {
input.Keyring = keyringImpl
input.MfaPrompt = prompt.Method(GlobalFlags.PromptDriver)
input.Signals = make(chan os.Signal)
signal.Notify(input.Signals, os.Interrupt, os.Kill)
ExecCommand(app, input)
return nil
})
Expand Down Expand Up @@ -149,6 +148,7 @@ func ExecCommand(app *kingpin.Application, input ExecCommandInput) {
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
signal.Notify(input.Signals, os.Interrupt, os.Kill)

if err := cmd.Start(); err != nil {
app.Fatalf("%v", err)
Expand Down

0 comments on commit 3c73304

Please sign in to comment.