From d204da6c3e4f138be157fd4b51f8bcc30882809d 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 | 2 ++ src/Installer/VendorInstaller.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 88bd16eb..ec72418e 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -9,6 +9,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). The format of this change log follows the advice given at [Keep a CHANGELOG](http://keepachangelog.com). ## [Unreleased] +### Changed +- Fixed nvm loading issue caused by upstream regression. ## [3.4.13] - 2023-09-02 ### Changed diff --git a/src/Installer/VendorInstaller.php b/src/Installer/VendorInstaller.php index 687b125c..9d566b15 100644 --- a/src/Installer/VendorInstaller.php +++ b/src/Installer/VendorInstaller.php @@ -129,7 +129,7 @@ public function installNode() } $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->passThrough($cmd, $this->moodle->directory); if (!$process->isSuccessful()) { throw new \RuntimeException('Node.js installation failed.');