Skip to content

Commit

Permalink
Exit after usage() is shown. Fixes #3583
Browse files Browse the repository at this point in the history
  • Loading branch information
loafoe committed Sep 4, 2024
1 parent 381d088 commit 11acbb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/goa/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func main() {
{
if len(os.Args) == 1 {
usage()
return
}

switch os.Args[1] {
Expand All @@ -29,12 +30,14 @@ func main() {
case "gen", "example":
if len(os.Args) == 2 {
usage()
return
}
cmd = os.Args[1]
path = os.Args[2]
offset = 2
default:
usage()
return
}
}

Expand Down

0 comments on commit 11acbb0

Please sign in to comment.