mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
cmd/ebitenmobile: fail earlier when a wrong subcommand is specified
Updates #2085
This commit is contained in:
parent
2c4ac5625b
commit
331ad93adf
@ -92,6 +92,10 @@ func main() {
|
||||
flag.Usage()
|
||||
}
|
||||
|
||||
if args[0] != "bind" {
|
||||
flag.Usage()
|
||||
}
|
||||
|
||||
var flagset flag.FlagSet
|
||||
flagset.StringVar(&buildO, "o", "", "")
|
||||
flagset.StringVar(&buildGcflags, "gcflags", "", "")
|
||||
@ -139,13 +143,8 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
switch args[0] {
|
||||
case "bind":
|
||||
if err := doBind(args, &flagset, buildTarget); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
default:
|
||||
flag.Usage()
|
||||
if err := doBind(args, &flagset, buildTarget); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user