Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go 1.18: Error while parsing flags from args [--localroot value]: unknown flag: --localroot #1594

Closed
eclipseo opened this issue Feb 3, 2022 · 1 comment

Comments

@eclipseo
Copy link

eclipseo commented Feb 3, 2022

In Fedora Rawhide, we are using Go 1.18. We are encountering the following error during the test:

Testing    in: /builddir/build/BUILD/cobra-1.3.0/_build/src
         PATH: /builddir/build/BUILD/cobra-1.3.0/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
       GOPATH: /builddir/build/BUILD/cobra-1.3.0/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags " -X github.com/spf13/cobra/version=1.3.0 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -Wl,-dT,/builddir/build/BUILD/cobra-1.3.0/.package_note-golang-github-spf13-cobra-1.3.0-1.fc36.x86_64.ld '"
      testing: github.com/spf13/cobra
github.com/spf13/cobra
[Debug] [Error] Error while parsing flags from args [--localroot value]: unknown flag: --localroot
PASS
ok  	github.com/spf13/cobra	0.032s
github.com/spf13/cobra
[Debug] [Error] Error while parsing flags from args [--localroot value]: unknown flag: --localroot
PASS
ok  	github.com/spf13/cobra	0.031s
github.com/spf13/cobra/cobra/cmd
Error: exit status 1

This error is maybe related to this change in Go 1.18: golang/go#41792
https://go-review.googlesource.com/c/go/+/271788/

@eclipseo
Copy link
Author

eclipseo commented Feb 3, 2022

This was probably unrelated to golang/go#41792 The issue is most likely linked to TestGoldenInitCmd which needs module support we have deactivated during build in Fedora.

@eclipseo eclipseo closed this as completed Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant