mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
cmd/ebitenmobile: Enable to specify the package
If a package is not specified, the current directory (.) is adopted.
This commit is contained in:
parent
ec9863dfef
commit
283de9b847
@ -166,7 +166,11 @@ func doBind(args []string, flagset *flag.FlagSet, buildOS string) error {
|
||||
}
|
||||
cfg.BuildFlags = []string{"-tags", tags}
|
||||
|
||||
pkgs, err := packages.Load(cfg, flagset.Args()[0])
|
||||
flagsetArgs := flagset.Args()
|
||||
if len(flagsetArgs) == 0 {
|
||||
flagsetArgs = []string{"."}
|
||||
}
|
||||
pkgs, err := packages.Load(cfg, flagsetArgs[0])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user