Skip to content

Commit

Permalink
feat(foundryup): warn users if already installed via cargo (#1157)
Browse files Browse the repository at this point in the history
* feat(foundryup): warn users if already installed via cargo

* fix: bash

* fix: bash 2
  • Loading branch information
transmissions11 authored Mar 31, 2022
1 parent 252d16b commit 233ab70
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions foundryup/foundryup
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ main() {
say "installed - $($FOUNDRY_BIN_DIR/forge --version)"
say "installed - $($FOUNDRY_BIN_DIR/cast --version)"
say "done"

if [[ $(which forge) =~ "cargo" ]]; then
warn "it appears your system has already has forge installed via cargo. you may need to run 'rm $(which forge)' to allow foundryup to take precedence!"
fi

if [[ $(which cast) =~ "cargo" ]]; then
warn "it appears your system has already has cast installed via cargo. you may need to run 'rm $(which cast)' to allow foundryup to take precedence!"
fi
else
need_cmd cargo
FOUNDRYUP_BRANCH=${FOUNDRYUP_BRANCH-master}
Expand Down

0 comments on commit 233ab70

Please sign in to comment.