How can I test the cli locally without conflicting with the version I have installed…
- User
How can I test the cli locally without conflicting with the version I have installed with homebrew?
Assistant
Let me take a quick look at how the project is set up (Taskfile, module name) so the advice matches your repo.
Assistant
Your repo already has this solved — the Makefile builds into a local
./bindirectory that isn't on your PATH, so it can't collide with the Homebrew install at/opt/homebrew/bin/intropy. Two good options:1.
make buildthen run via relative path (best for realistic testing — embeds version metadata via ldflags):shmake build ./bin/intropy manifests create --help2.
go runfor quick iteration (no binary artifact at all):shgo run ./cmd/intropy manifests create --helpNote that
go runskips the ldflags, soversionwill report defaults — fine for testing behavior, not for testing version output.One thing to avoid:
make installputs a binary namedintropyinto$GOPATH/bin, and then which copy you get when typing depends on your PATH order — that's exactly the ambiguity you're trying to avoid, so I'd skip it while the Homebrew version is installed.