Skip to content

Commit

Permalink
FIX Fix nvm installation (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Sep 27, 2024
1 parent f8f035d commit d0e4820
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ runs:
echo "Missing .nvmrc"
exit 1
fi
# Set nvmdir explicitly before installation. Default dir doesn't work for some reason.
export NVM_DIR="${HOME}/.nvm"
# Remove any sneaky attempts to put __install-nvm.sh into pull-requests
if [[ -f __install-nvm.sh ]]; then
rm __install-nvm.sh
Expand All @@ -215,7 +217,6 @@ runs:
echo "Error while installing nvm"
exit 1
fi
export NVM_DIR="$HOME/.nvm"
# this loads nvm into the current terminal
[[ -s "$NVM_DIR/nvm.sh" ]] && \. "$NVM_DIR/nvm.sh"
ADMIN_NPM_VERSION=
Expand Down
4 changes: 2 additions & 2 deletions install-nvm.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh
wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh
php -r '
$hash = "dd4b116a7452fc3bb8c0e410ceac27e19b0ba0f900fe2f91818a95c12e92130fdfb8170fec170b9fb006d316f6386f2b";
$hash = "faff9a72a1c8a202d6ad9b79e124684a8b128a0b3f44bdff0898bb6f4ca18550178cc7d435cfe10b2cc37396075b338d";
if (hash_file("sha384", "install.sh") === $hash) {
echo "Installer verified";
} else {
Expand Down

0 comments on commit d0e4820

Please sign in to comment.