Skip to content

Commit e178431

Browse files
Set the exit code as failure in errors
1 parent 32642d0 commit e178431

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ func main() {
3333
}
3434
if len(args) > 1 {
3535
fmt.Fprintf(os.Stderr, "A single command must be specified.\n")
36-
return
36+
os.Exit(1)
3737
}
3838

3939
command := strings.ToLower(args[0])
4040

4141
raw, ok := files[command]
4242
if !ok {
4343
fmt.Fprintf(os.Stderr, "Command %s is not known.\n", command)
44-
return
44+
os.Exit(1)
4545
}
4646
text := string(raw)
4747

0 commit comments

Comments
 (0)