bingo icon indicating copy to clipboard operation
bingo copied to clipboard

List by package fail when list by binary name works

Open mbideau opened this issue 4 years ago • 1 comments

bingo version output:

❯ bingo version
v0.5.1

go version output:

❯ go version
go version go1.15.9 linux/amd64

What happened: listing of installed module/package failed

What you expected to happen: listing of installed module/package succeed and print out the package line

How to reproduce it (as minimally and precisely as possible):

❯ (cd $(mktemp -d) && pwd && bingo get -v -l github.com/BurntSushi/toml/cmd/tomlv && bingo list tomlv && bingo list github.com/BurntSushi/toml/cmd/tomlv || bingo list github.com/BurntSushi/toml/cmd/[email protected])
/tmp/tmp.SYM36q1KWe
Bingo not used before here, creating directory for pinned modules for you at .bingo
getting target github.com/BurntSushi/toml/cmd/tomlv (module  )
exec 'go mod init -modfile=/tmp/tmp.SYM36q1KWe/.bingo/tomlv-e.tmp.mod _'
exec 'go get -modfile=/tmp/tmp.SYM36q1KWe/.bingo/tomlv-e.tmp.mod -d github.com/BurntSushi/toml/cmd/tomlv'
exec 'go env GOPATH'
exec 'go mod init -modfile=/tmp/tmp.SYM36q1KWe/.bingo/tomlv.tmp.mod _'
exec 'go list -modfile=/tmp/tmp.SYM36q1KWe/.bingo/tomlv.tmp.mod -mod=mod -f={{.Name}} github.com/BurntSushi/toml/cmd/tomlv'
exec 'go build -modfile=/tmp/tmp.SYM36q1KWe/.bingo/tomlv.tmp.mod -o=tomlv-v0.4.1 github.com/BurntSushi/toml/cmd/tomlv'

Name	Binary Name	Package @ Version				Build EnvVars	Build Flags
----	-----------	-----------------				-------------	-----------
tomlv	tomlv-v0.4.1	github.com/BurntSushi/toml/cmd/[email protected]			

Name	Binary Name	Package @ Version	Build EnvVars	Build Flags
----	-----------	-----------------	-------------	-----------
Error: list command failed: Pinned tool github.com/BurntSushi/toml/cmd/tomlv not found

Name	Binary Name	Package @ Version	Build EnvVars	Build Flags
----	-----------	-----------------	-------------	-----------
Error: list command failed: Pinned tool github.com/BurntSushi/toml/cmd/[email protected] not found

As you can see, the first invocation bingo list tomlv succeed, but the two following failed using :

  • bingo list github.com/BurntSushi/toml/cmd/tomlv
  • bingo list github.com/BurntSushi/toml/cmd/[email protected]

mbideau avatar Nov 12 '21 12:11 mbideau

Thanks for reporting, and sorry for lag!

bwplotka avatar Apr 21 '22 13:04 bwplotka