Go install method fails if tool has replace directives
- Dominant language
- Go
- Stars
- 57
- Forks
- 10
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 7
Description
If installing a tool with the `go-install` method, but the tool has a replace directive, this fails. Unfortunately, today, this [includes](https://github.com/anchore/binny/blob/main/.binny.yaml#L81-L86) `syft` and since there are no FreeBSD binaries, if Syft gets installed it would need to be installed with the `go-install` method in this case. Binny could fall back to running a standard `go build` in this case. There is [an experiment with this change here](https://github.com/anchore/binny/blob/fix-freebsd/tool/goinstall/installer.go#L87).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in tool/goinstall/installer.go and compare the current behavior with the linked fix-freebsd experiment. Reproduce the go-install failure for a tool with replace directives, including syft from the referenced .binny.yaml entries, and verify that installation succeeds through the standard go build fallback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100