foundry
foundry copied to clipboard
feat(foundryup): robustness checks and shell improvements
Motivation
foundryup is not robust.
make it robust.
Solution
sanity checks and etc.
check_bins_in_use
Introduces a new function, check_bins_in_use which makes sure that something like forge build -w isn't running.
fix check_cmd
also fixes check_cmd output
fix curl/wget
enforce TLS v1.2
[!NOTE]
need_cmd curlactually would preventwgetfrom running, as the script would error out and there is no if/else logic to fail over to using wget anyway.
really some testing of the scripts should be implemented, however after trying to get Docker container testing added, not willing to just yolo some tests into here
added process running check in https://github.com/foundry-rs/foundry/pull/9680
added process running check in #9680
is valid bash
check_cmd() {
command -v "$1" &>/dev/null
}
is not supported in dash (Ubuntu)
check_cmd() {
command -v "$1" >/dev/null 2>&1
}