Support Windows
We'd like to release binny for Windows so that projects using binny to manager their binary dependencies are easier to work on on Windows.
Right now, there are a few obstacles to this:
- Binny doesn't compile on Windows due to directly using the
syscall.SIGWINCHconstant, which doesn't exist on Windows. To fix that, we should pull all the fancy terminal UI stuff into separate files that aren't built on Windows. - Binny has no Windows CI - we should get at least unit tests running on Windows
- Binny has no Windows release artifacts - this should be a simple goreleaser config change
- Binny has no Windows-compatible install script. Maybe adding
install.ps1to the repo, or maybe publishing to chocalatey is the right path here.
This would make adding tests to https://github.com/anchore/syft/pull/2654 a lot easier.
https://gist.github.com/f3l3gy/0e89dde158dde024959e36e915abf6bd might be how we'd do an install script.
Adding CLI tests as a step towards this: https://github.com/anchore/binny/pull/21
Current issue facing this is that running go install to a temp directory and then trying to rename the resulting .exe to the .tool directory fails with permission denied errors on Windows, and I haven't figured out why yet.