Skip to content

Commit

Permalink
Handle the case where no organization is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
rm3l committed Feb 10, 2022
1 parent c61e5b3 commit b8aee8c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ See https://bit.ly/3HurHe3 for more details on the search syntax`)
fmt.Println("Options: ")
flag.PrintDefaults()
}

if len(os.Args) < 2 {
//goland:noinspection GoUnhandledErrorResult
fmt.FPrintln(os.Stderr, "missing organization")
flag.Usage()
os.Exit(1)
}

organization := os.Args[1]

Expand Down

0 comments on commit b8aee8c

Please sign in to comment.