From 9dfa357c5b1aa5efa0179b0514334bcfaddb252f Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 27 Sep 2024 12:01:36 +1200 Subject: [PATCH] FIX Fix nvm installation --- action.yml | 3 ++- install-nvm.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index ec75f6c..a526291 100644 --- a/action.yml +++ b/action.yml @@ -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 @@ -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= diff --git a/install-nvm.sh b/install-nvm.sh index 3e88dcc..57476fd 100644 --- a/install-nvm.sh +++ b/install-nvm.sh @@ -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 {