From 283de9b847409f338ac311e6d28cf4083af37f1e Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 22 Jul 2020 00:51:47 +0900 Subject: [PATCH] cmd/ebitenmobile: Enable to specify the package If a package is not specified, the current directory (.) is adopted. --- cmd/ebitenmobile/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/ebitenmobile/main.go b/cmd/ebitenmobile/main.go index 19b6b5398..7fa11d4d4 100644 --- a/cmd/ebitenmobile/main.go +++ b/cmd/ebitenmobile/main.go @@ -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 }