Fail on missing args
This commit is contained in:
parent
92b937936e
commit
c42433e12f
@ -182,10 +182,16 @@ func main() {
|
|||||||
|
|
||||||
switch sub {
|
switch sub {
|
||||||
case "add", "a":
|
case "add", "a":
|
||||||
|
if len(args) < 1 {
|
||||||
|
fatalf("missing arg\n\nusage: pm remote add [<uris>]\n")
|
||||||
|
}
|
||||||
if err := remote.Add(root, args); err != nil {
|
if err := remote.Add(root, args); err != nil {
|
||||||
fatalf("remote add: %v\n", err)
|
fatalf("remote add: %v\n", err)
|
||||||
}
|
}
|
||||||
case "rm":
|
case "rm":
|
||||||
|
if len(args) < 1 {
|
||||||
|
fatalf("missing arg\n\nusage: pm remote rm [<uris>]\n")
|
||||||
|
}
|
||||||
if err := remote.Remove(root, args); err != nil {
|
if err := remote.Remove(root, args); err != nil {
|
||||||
fatalf("remote remove: %v\n", err)
|
fatalf("remote remove: %v\n", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user