From 5be5de611c28ad81ff76718faa2ef26591d981ce Mon Sep 17 00:00:00 2001 From: Ruslan Kabalin Date: Fri, 23 Aug 2024 10:25:05 +0100 Subject: [PATCH] Fix nvm loading issue. We should not rely on success exit status from nvm.sh loading. Fixes #309 --- docs/CHANGELOG.md | 3 +++ src/Installer/VendorInstaller.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 26634f5a..f09690c3 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -9,6 +9,9 @@ This project adheres to [Semantic Versioning](https://semver.org/). The format of this change log follows the advice given at [Keep a CHANGELOG](https://keepachangelog.com). ## [Unreleased] +### Changed +- Fixed nvm loading issue caused by upstream regression. + ## [4.5.3] - 2024-07-05 ### Added - Support for version 4.4 of the app, that uses new defaults and Chrome (Selenium 4) version. diff --git a/src/Installer/VendorInstaller.php b/src/Installer/VendorInstaller.php index 3f1fb3bc..190bd38f 100644 --- a/src/Installer/VendorInstaller.php +++ b/src/Installer/VendorInstaller.php @@ -120,7 +120,7 @@ public function installNode(): void } $nvmDir = getenv('NVM_DIR'); - $cmd = ". $nvmDir/nvm.sh && nvm install && nvm use && echo \"NVM_BIN=\$NVM_BIN\""; + $cmd = ". $nvmDir/nvm.sh; nvm install && nvm use && echo \"NVM_BIN=\$NVM_BIN\""; $process = $this->execute->passThroughProcess( Process::fromShellCommandline($cmd, $this->moodle->directory, null, null, null)