Skip to content

Commit ebac08e

Browse files
authored
cmd/scriggo: exit with status code 2 when running just scriggo
Currently, when 'scriggo' is run without any other parameters/subcommands, it returns exit code 0. This is generally not expected, as it represents an error in which nothing has been executed. The go command, for example, returns 2 in this case. So this commit ensures that in this case, scriggo exits with exit code 2, which also appears to be the behavior of the Bash builtins. This appears to be the only case in the Scriggo command where a success status was returned when the command was called with incorrect arguments, so it has been fixed separately in this commit; for all other cases, see issue #1012.
1 parent 6b8be64 commit ebac08e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cmd/scriggo/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func main() {
5959
// No command provided.
6060
if len(os.Args) == 1 {
6161
flag.Usage()
62-
exit(0)
62+
exit(2)
6363
return
6464
}
6565

0 commit comments

Comments
 (0)