bingo icon indicating copy to clipboard operation
bingo copied to clipboard

Option `-l` create broken symlink (in the parent/project folder)

Open mbideau opened this issue 2 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: installation of a module created a broken symlink in the parent/project folder

What you expected to happen: installation of a module to create a valid symlink in the .bingo folder

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

❯ (cd $(mktemp -d) && pwd && bingo get -v -l github.com/BurntSushi/toml/cmd/tomlv && ls -alh)
/tmp/tmp.SuLUJFGIXr
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.SuLUJFGIXr/.bingo/tomlv-e.tmp.mod _'
exec 'go get -modfile=/tmp/tmp.SuLUJFGIXr/.bingo/tomlv-e.tmp.mod -d github.com/BurntSushi/toml/cmd/tomlv'
exec 'go env GOPATH'
exec 'go mod init -modfile=/tmp/tmp.SuLUJFGIXr/.bingo/tomlv.tmp.mod _'
exec 'go list -modfile=/tmp/tmp.SuLUJFGIXr/.bingo/tomlv.tmp.mod -mod=mod -f={{.Name}} github.com/BurntSushi/toml/cmd/tomlv'
exec 'go build -modfile=/tmp/tmp.SuLUJFGIXr/.bingo/tomlv.tmp.mod -o=tomlv-v0.4.1 github.com/BurntSushi/toml/cmd/tomlv'
total 4,0K
drwx------ 1 michael michael   22 12 nov.  12:20 .
drwxrwxrwt 1 root    root    2,4K 12 nov.  12:20 ..
drwxr-xr-x 1 michael michael  142 12 nov.  12:20 .bingo
lrwxrwxrwx 1 michael michael   12 12 nov.  12:20 tomlv -> tomlv-v0.4.1

Without colors it is hard to figure out, but the last line is a broken symlink in the wrong folder.

Anything else we need to know:

It might just requires to add in the source code the absolute path to the symlink destination (not the target).

Thank you again for the software.

mbideau avatar Nov 12 '21 11:11 mbideau

Same issue over here.

bingo v0.6 go go version go1.19 darwin/arm64

promiseofcake avatar Aug 21 '22 22:08 promiseofcake