Skip to content

Commit

Permalink
Fix the cleanup cancellation at the end of a Run.
Browse files Browse the repository at this point in the history
  • Loading branch information
creachadair committed Mar 7, 2024
1 parent ee4e5b0 commit f058c6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func RunOrFail(env *Env, rawArgs []string) {
// command-line usage was incorrect, or ErrRequestHelp if the user requested
// help via the --help flag.
func Run(env *Env, rawArgs []string) (err error) {
defer env.Cancel(err)
defer func() { env.Cancel(err) }()
cmd := env.Command
env.Args = rawArgs

Expand Down

0 comments on commit f058c6f

Please sign in to comment.