From c7b78140b84dfa41090fc42be1e3c2cecabec7e4 Mon Sep 17 00:00:00 2001 From: sewn Date: Mon, 25 Sep 2023 21:57:18 +0300 Subject: [PATCH] cmd/vinegar: print usage on no program in exec command --- cmd/vinegar/vinegar.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/vinegar/vinegar.go b/cmd/vinegar/vinegar.go index 5967c926..cc42903a 100644 --- a/cmd/vinegar/vinegar.go +++ b/cmd/vinegar/vinegar.go @@ -67,6 +67,10 @@ func main() { switch cmd { case "exec": + if len(args) < 2 { + usage() + } + if err := pfx.Wine(args[1], args[2:]...).Run(); err != nil { log.Fatal(err) }