issue/pr create: exit with nonzero status code when "Cancel" was chosen

This is to indicate that the command had not finished successfully.
This commit is contained in:
Mislav Marohnić 2021-02-23 17:06:29 +01:00
parent d6798b1852
commit b0b90afa87
2 changed files with 3 additions and 1 deletions

View file

@ -249,6 +249,7 @@ func createRun(opts *CreateOptions) (err error) {
if action == prShared.CancelAction {
fmt.Fprintln(opts.IO.ErrOut, "Discarding.")
err = cmdutil.SilentError
return
}
} else {

View file

@ -299,7 +299,8 @@ func createRun(opts *CreateOptions) (err error) {
if action == shared.CancelAction {
fmt.Fprintln(opts.IO.ErrOut, "Discarding.")
return nil
err = cmdutil.SilentError
return
}
err = handlePush(*opts, *ctx)