Skip to content

Commit d8044c0

Browse files
author
Måns Thörnvik
committed
fix
1 parent bea2fad commit d8044c0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

arbiter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ func parseArguments(args []string) (int, error) {
212212
flagset.DurationVar(&duration, "duration", duration, "The duration of the test run, minimum 30 seconds.")
213213
flagset.StringVar(&reportPath, "report.path", reportPath, "Path to the final report.")
214214

215-
totalErr := ErrParsingFailed
215+
var totalErr error
216216
parseErr := flagset.Parse(os.Args[1:])
217217
if parseErr != nil {
218-
totalErr = fmt.Errorf("%w: %w", totalErr, parseErr)
218+
totalErr = fmt.Errorf("%w: %w", ErrParsingFailed, parseErr)
219219
}
220220

221221
subcommandIndex := slices.IndexFunc(args, func(arg string) bool {

examples/samplemod/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
func main() {
1414
err := arbiter.Run(module.Modules{samplemod.New()})
15-
if err != nil {
15+
if err == nil {
1616
os.Exit(0)
1717
}
1818

0 commit comments

Comments
 (0)