return non-zero exit code on improper flag usage

pull/13310/head
Steven Powell 2022-01-06 14:53:19 -08:00
parent 2aef5c60ee
commit ea01e98135
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ func main() {
if *releasesFile == "" || *version == "" {
fmt.Println("All flags are required and cannot be empty")
flag.PrintDefaults()
return
os.Exit(1)
}
r, err := getReleases(*releasesFile)

View File

@ -34,7 +34,7 @@ func main() {
if *dataFile == "" || *dataLast90File == "" {
fmt.Println("All flags are required and cannot be empty")
flag.PrintDefaults()
return
os.Exit(1)
}
data, err := os.Open(*dataFile)