mse/cmd/mse: Fail on missing subcommand
This commit is contained in:
parent
7b2a7a667d
commit
15c8846153
|
@ -37,7 +37,7 @@ func mainErr() error {
|
|||
}{
|
||||
CryptoMethod: mse.AllSupportedCrypto,
|
||||
}
|
||||
arg.MustParse(&args)
|
||||
p := arg.MustParse(&args)
|
||||
if args.Dial != nil {
|
||||
cn, err := net.Dial(args.Dial.Network, args.Dial.Address)
|
||||
if err != nil {
|
||||
|
@ -72,6 +72,9 @@ func mainErr() error {
|
|||
}
|
||||
doStreaming(rw)
|
||||
}
|
||||
if p.Subcommand() == nil {
|
||||
p.Fail("missing subcommand")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue