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:
parent
d6798b1852
commit
b0b90afa87
2 changed files with 3 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue