improve the error message if nothing is passed to ghq create

This commit is contained in:
FUJI Goro 2022-03-12 10:59:18 +09:00
parent 0e02db0b9a
commit 68aa9d7c2e

View file

@ -14,6 +14,11 @@ func doCreate(c *cli.Context) error {
vcs = c.String("vcs")
w = c.App.Writer
)
if name == "" {
return fmt.Errorf("repository name is required")
}
u, err := newURL(name, false, true)
if err != nil {
return err