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

vendor directory not properly populated #142

Open
zhsj opened this issue Feb 6, 2023 · 0 comments
Open

vendor directory not properly populated #142

zhsj opened this issue Feb 6, 2023 · 0 comments

Comments

@zhsj
Copy link

zhsj commented Feb 6, 2023

The vendor dir https://github.com/xenserver/xe-guest-utilities/tree/master/vendor only has modules.txt files, without the vendor sources.

This makes plain go command fail to operate.

$ go build -o build/xenstore ./xenstore
go: finding module for package golang.org/x/sys/unix
xenstore/xenstore.go:11:2: cannot query module due to -mod=vendor
        (Go version in go.mod is at least 1.14 and vendor directory exists.)

Either removing the vendor/modules.txt file or keeping all vendor files will make go command happy.

$ rm -r vendor/
$ go build -o build/xenstore ./xenstore
$ go mod vendor
$ ls vendor/golang.org/x/sys/
AUTHORS  CONTRIBUTORS  internal  LICENSE  PATENTS  unix
$ go build -o build/xenstore ./xenstore
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