From 83e8c54caa4e8865b8d4eee2b3e946efc59f5594 Mon Sep 17 00:00:00 2001 From: Jguer Date: Wed, 25 Oct 2017 17:16:35 +0900 Subject: [PATCH] ./yay - no longer crashes yay --- cmd.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd.go b/cmd.go index 6d37b393..1ad005f7 100644 --- a/cmd.go +++ b/cmd.go @@ -137,6 +137,9 @@ func parser() (op string, options []string, packages []string, changedConfig boo op = "yogurt" for _, arg := range os.Args[1:] { + if len(arg) < 2 { + continue + } if arg[0] == '-' && arg[1] != '-' { switch arg { default: