Skip to content

Commit 6ff347e

Browse files
committed
fix(cli): use ExecuteC() to match Cobra
This modifies the `cli.Root().Execute()` to `cli.Root).ExecuteC()` to match the default behavior of Cobra. We do this so errors will always print the "run --help" line.
1 parent 758dceb commit 6ff347e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/coder/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
func main() {
1616
dadjoke()
17-
err := cli.Root().Execute()
17+
_, err := cli.Root().ExecuteC()
1818
if err != nil {
1919
if errors.Is(err, cliui.Canceled) {
2020
os.Exit(1)

0 commit comments

Comments
 (0)