From d7ab78de71ad2e4d965446a6083ebb48150f0533 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Tue, 26 Apr 2022 18:11:49 +0200 Subject: [PATCH] Only print help when called without arguments Fixes #401 --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index eebaf2f2..6c5e835b 100644 --- a/main.go +++ b/main.go @@ -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, "")