Skip to content

Commit

Permalink
Only print help when called without arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
FiloSottile committed Apr 26, 2022
1 parent abde85b commit d7ab78d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ const advancedUsage = `Advanced options:
var Version string

func main() {
if len(os.Args) == 1 {
fmt.Print(shortUsage)
return
}
log.SetFlags(0)
var (
installFlag = flag.Bool("install", false, "")
Expand Down

0 comments on commit d7ab78d

Please # to comment.