From e577f6ffc1f97e8e9e1ae56547d06891f41a694e Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Wed, 28 Feb 2024 13:04:26 +0100 Subject: [PATCH] fix(foundryup): use fish_add_path in fish shell --- foundryup/install | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/foundryup/install b/foundryup/install index 19bfe573873d..da8156a09fe3 100755 --- a/foundryup/install +++ b/foundryup/install @@ -45,7 +45,12 @@ esac # Only add foundryup if it isn't already in PATH. if [[ ":$PATH:" != *":${FOUNDRY_BIN_DIR}:"* ]]; then # Add the foundryup directory to the path and ensure the old PATH variables remain. - echo >> "$PROFILE" && echo "export PATH=\"\$PATH:$FOUNDRY_BIN_DIR\"" >> "$PROFILE" + # If the shell is fish, echo fish_add_path instead of export. + if [[ "$PREF_SHELL" == "fish" ]]; then + echo >> "$PROFILE" && echo "fish_add_path -a $FOUNDRY_BIN_DIR" >> "$PROFILE" + else + echo >> "$PROFILE" && echo "export PATH=\"\$PATH:$FOUNDRY_BIN_DIR\"" >> "$PROFILE" + fi fi # Warn MacOS users that they may need to manually install libusb via Homebrew: