Conversation
The newest `foundryup` now defaults to installing stable Foundry, see foundry-rs/foundry#9585 and https://github.com/foundry-rs/foundry/releases/tag/stable Closes crytic#92
d86660f to
3eef552
Compare
elopez
left a comment
There was a problem hiding this comment.
Thanks for the PR! I've left you some comments inline -- I like the general idea, but there's some issues that should be resolved before we can move forward.
entrypoint.sh
Outdated
|
|
||
| wget -q -O nvm-install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | ||
| if [ ! "fabc489b39a5e9c999c7cab4d281cdbbcbad10ec2f8b9a7f7144ad701b6bfdc7 nvm-install.sh" = "$(sha256sum nvm-install.sh)" ]; then | ||
| sha256sum -c checksum --status --strict --ignore-missing |
There was a problem hiding this comment.
if this returns non-zero (i.e mismatched checksum), the execution will stop then because the script is run with set -e and the user won't see the error message from below.
I believe you should be able to do if ! sha256sum .....; then ... instead to have it working.
I am also not a fan of --ignore-missing, as it could be error prone. If, for instance, the filename changes, the check may still pass silently, leaving the user unprotected. We could have two separate checksum files to avoid having to use --ignore-missing
There was a problem hiding this comment.
Does this the new syntax (with the grep) look good ?
It is usually preferable to separate concerns. In particular, checksum are critical security values that should not be mixed up with the rest of the installation logic.
This is targetting #93