Skip to content

Commit

Permalink
fix: set correct INSTALL_DIR for brew installation
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroberry committed Jan 8, 2025
1 parent 4399644 commit 891df4a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ set_filename() {
download_fnm() {
if [ "$USE_HOMEBREW" = "true" ]; then
brew install fnm
INSTALL_DIR="$(brew --prefix fnm)/bin"
else
if [ "$RELEASE" = "latest" ]; then
URL="https://github.com/Schniz/fnm/releases/latest/download/$FILENAME.zip"
Expand Down Expand Up @@ -173,7 +174,9 @@ setup_shell() {
echo '# fnm'
echo 'FNM_PATH="'"$INSTALL_DIR"'"'
echo 'if [ -d "$FNM_PATH" ]; then'
echo ' export PATH="'$INSTALL_DIR':$PATH"'
if [ "$USE_HOMEBREW" != "true" ]; then
echo ' export PATH="$FNM_PATH:$PATH"'
fi
echo ' eval "`fnm env`"'
echo 'fi'
} | tee -a "$CONF_FILE"
Expand All @@ -187,7 +190,9 @@ setup_shell() {
echo '# fnm'
echo 'set FNM_PATH "'"$INSTALL_DIR"'"'
echo 'if [ -d "$FNM_PATH" ]'
echo ' set PATH "$FNM_PATH" $PATH'
if [ "$USE_HOMEBREW" != "true" ]; then
echo ' set PATH "$FNM_PATH" $PATH'
fi
echo ' fnm env | source'
echo 'end'
} | tee -a "$CONF_FILE"
Expand All @@ -205,7 +210,9 @@ setup_shell() {
echo '# fnm'
echo 'FNM_PATH="'"$INSTALL_DIR"'"'
echo 'if [ -d "$FNM_PATH" ]; then'
echo ' export PATH="$FNM_PATH:$PATH"'
if [ "$USE_HOMEBREW" != "true" ]; then
echo ' export PATH="$FNM_PATH:$PATH"'
fi
echo ' eval "`fnm env`"'
echo 'fi'
} | tee -a "$CONF_FILE"
Expand Down

0 comments on commit 891df4a

Please sign in to comment.