mirror of
https://github.com/octoleo/restic.git
synced 2024-12-23 11:28:54 +00:00
manpage: Do not panic when no command is given
This commit is contained in:
parent
6724b9a583
commit
e348b3deeb
@ -42,7 +42,10 @@ func runManpage(cmd *cobra.Command, args []string) error {
|
|||||||
return doc.GenManTree(cmdRoot, header, dir)
|
return doc.GenManTree(cmdRoot, header, dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(args) > 1 {
|
switch {
|
||||||
|
case len(args) == 0:
|
||||||
|
return errors.Fatalf("no command given")
|
||||||
|
case len(args) > 1:
|
||||||
return errors.Fatalf("more than one command given: %v", args)
|
return errors.Fatalf("more than one command given: %v", args)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user