mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
cmd/gogio: restore package path handling
A previous change converted the package argument to gogio to an absolute path. However, gogio supports all package paths that may appear in Go import statements. For example, the path "gioui.org/cmd/example/kitchen" should not be converted. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-4
@@ -46,7 +46,7 @@ func main() {
|
||||
fmt.Fprintf(os.Stderr, "gogio: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
buildInfo, err := newBuildInfo(getPkgAbsPath())
|
||||
buildInfo, err := newBuildInfo(flag.Arg(0))
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "gogio: %v\n", err)
|
||||
os.Exit(1)
|
||||
@@ -63,9 +63,6 @@ func flagValidate() error {
|
||||
if pkgPathArg == "" {
|
||||
return errors.New("specify a package")
|
||||
}
|
||||
if _, err := filepath.Abs(pkgPathArg); err != nil {
|
||||
return err
|
||||
}
|
||||
if *target == "" {
|
||||
return errors.New("please specify -target")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user