From c35555d852a8be5833c9f124d35aec0929713b09 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Mon, 13 May 2019 23:37:32 -0400 Subject: [PATCH] error code if no directory --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index e482500..ea4baf2 100644 --- a/main.go +++ b/main.go @@ -19,7 +19,10 @@ func main() { Aliases: []string{"u"}, Usage: "Scan a directory's manifests", Action: func(c *cli.Context) error { - return scan(c) + if len(c.Args()) > 0 { + return scan(c) + } + return cli.NewExitError("no directory provided", 5) }, }, }