Skip to content

Commit

Permalink
FIX Ensure nvmdir exists (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Sep 29, 2024
1 parent d0e4820 commit a08a8c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ runs:
fi
# Set nvmdir explicitly before installation. Default dir doesn't work for some reason.
export NVM_DIR="${HOME}/.nvm"
# Installation fails if install dir is specified but doesn't exist
if ! [[ -d "$NVM_DIR" ]]; then
echo "NVM_DIR '$NVM_DIR' doesn't exist - creating it now"
mkdir $NVM_DIR
fi
# Remove any sneaky attempts to put __install-nvm.sh into pull-requests
if [[ -f __install-nvm.sh ]]; then
rm __install-nvm.sh
Expand All @@ -218,7 +223,7 @@ runs:
exit 1
fi
# this loads nvm into the current terminal
[[ -s "$NVM_DIR/nvm.sh" ]] && \. "$NVM_DIR/nvm.sh"
[[ -s "$NVM_DIR/nvm.sh" ]] && \. "$NVM_DIR/nvm.sh" --no-use
ADMIN_NPM_VERSION=
if [[ -d vendor/silverstripe/admin ]]; then
cd vendor/silverstripe/admin
Expand Down

0 comments on commit a08a8c0

Please sign in to comment.