diff --git a/pkg/cmd/issue/create/create.go b/pkg/cmd/issue/create/create.go index 3d6b5b25c..298f3bf97 100644 --- a/pkg/cmd/issue/create/create.go +++ b/pkg/cmd/issue/create/create.go @@ -249,8 +249,8 @@ func createRun(opts *CreateOptions) (err error) { if action == prShared.CancelAction { fmt.Fprintln(opts.IO.ErrOut, "Discarding.") - err = cmdutil.SilentError - return + err = nil // avoid triggering PreserveInput + return cmdutil.SilentError } } else { if tb.Title == "" { diff --git a/pkg/cmd/pr/create/create.go b/pkg/cmd/pr/create/create.go index 18b8c1e99..a56410726 100644 --- a/pkg/cmd/pr/create/create.go +++ b/pkg/cmd/pr/create/create.go @@ -299,8 +299,8 @@ func createRun(opts *CreateOptions) (err error) { if action == shared.CancelAction { fmt.Fprintln(opts.IO.ErrOut, "Discarding.") - err = cmdutil.SilentError - return + err = nil // avoid triggering PreserveInput + return cmdutil.SilentError } err = handlePush(*opts, *ctx)