error code if no directory

This commit is contained in:
Tyrel Souza 2019-05-13 23:37:32 -04:00 committed by Tyrel Souza
parent 3d06f31b88
commit c35555d852
No known key found for this signature in database
GPG Key ID: 5A9394D4C30AEAC0

View File

@ -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)
},
},
}