diff options
| author | Hugo Hromic <[email protected]> | 2024-06-29 15:42:05 +0100 |
|---|---|---|
| committer | Hugo Hromic <[email protected]> | 2024-06-29 15:44:50 +0100 |
| commit | a7c40c36a3a425dd1d28cbc97a3340aafb494d19 (patch) | |
| tree | e6277a9c3ab651484c233da699fa90874fcdf3ee /usage_test.go | |
| parent | bee5cf5d7cc07c41b2a528052bfba0566b5069c0 (diff) | |
Use standard exit status code for usage errors
* The stdlib `flags` package and most command line utilities use status code `2`.
Diffstat (limited to 'usage_test.go')
| -rw-r--r-- | usage_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usage_test.go b/usage_test.go index b2bcab1..71324eb 100644 --- a/usage_test.go +++ b/usage_test.go @@ -738,7 +738,7 @@ error: something went wrong p.Fail("something went wrong") assert.Equal(t, expectedStdout[1:], stdout.String()) - assert.Equal(t, -1, exitCode) + assert.Equal(t, 2, exitCode) } func TestFailSubcommand(t *testing.T) { @@ -761,7 +761,7 @@ error: something went wrong require.NoError(t, err) assert.Equal(t, expectedStdout[1:], stdout.String()) - assert.Equal(t, -1, exitCode) + assert.Equal(t, 2, exitCode) } type lengthOf struct { |
