foundry icon indicating copy to clipboard operation
foundry copied to clipboard

feat(foundryup): robustness checks and shell improvements

Open sambacha opened this issue 1 year ago • 1 comments
trafficstars

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 curl actually would prevent wget from running, as the script would error out and there is no if/else logic to fail over to using wget anyway.

sambacha avatar May 22 '24 06:05 sambacha

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

sambacha avatar May 22 '24 08:05 sambacha

added process running check in https://github.com/foundry-rs/foundry/pull/9680

grandizzy avatar Jan 14 '25 10:01 grandizzy

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
}

sambacha avatar Mar 17 '25 02:03 sambacha