Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix double task execution with
quiet
runner option (#132)
When the `WithRunnerQuiet` option [1] of the `golang` runner [3] or `WithQuiet` option [2] of the `gotool` runner [4] was set to `true`, the task passed to their `Run` method [5] was running twice. This was caused by a missing return statement when the execution finished with a `error` of value `nil` [^1] [^2]. To fix this bug both code blocks are now returning early with `nil` instead of keep going on in the code flow. [1]: https://pkg.go.dev/github.com/svengreb/wand@v0.8.0/pkg/task/golang#WithRunnerQuiet [2]: https://pkg.go.dev/github.com/svengreb/wand@v0.8.0/pkg/task/gotool#WithQuiet [3]: https://pkg.go.dev/github.com/svengreb/wand@v0.8.0/pkg/task/golang#Runner [4]: https://pkg.go.dev/github.com/svengreb/wand@v0.8.0/pkg/task/gotool#Runner [5]: https://pkg.go.dev/github.com/svengreb/wand/pkg/task@v0.8.0#Runner.Run [^1]: https://github.com/svengreb/wand/blob/v0.8.0/pkg/task/golang/golang.go#L43-L50 [^2]: https://github.com/svengreb/wand/blob/v0.8.0/pkg/task/gotool/gotool.go#L218-L225 GH-131
- Loading branch information