asdf-golang
asdf-golang copied to clipboard
Download checksum verification fails on FreeBSD 13.1
Describe the bug When attempting to download the golang archive on FreeBSD 13 the checksum fails to verify with the following error:
verifying checksum
sha256sum: option requires an argument -- c
usage: sha256sum [-pqrtx] [-c file] [-s string] [files ...]
Authenticity of package archive can not be assured. Exiting.
This can be worked around by temporarily renaming the sha256sum
tool to sha256sum.fbsd
and re-running the installer.
To Reproduce Steps to reproduce the behavior:
- On a FreeBSD 13.1 amd64 system, attempt to
asdf install golang 1.17.13
- See error
Expected behavior
This seems to be due to an incompatibility of the between the FreeBSD 13 and Linux versions of the sha256sum tool. Temporarily renaming the sha256sum
binary and re-running the command worked. Looking at the code, if sha256sum
is not found the shasum
tool is used instead. I have also tested on an older FreeBSD install (11.4) which does not include the sha256sum
tool and everything works as expected.
Additional context
Since this is a bug specific to newer versions of FreeBSD, I am unsure how best to resolve this issue which is why I am opening a bug instead of submitting a PR to correct it. It may make more sense to simply use only the shasum
tool on the FreeBSD platform, or it may make more sense to simply try that tool first in all cases? I'm happy to do the PR for whatever the discussion of this issue feels is appropriate.