Skip to content

Commit d204da6

Browse files
committed
Fix nvm loading issue.
We should not rely on success exit status from nvm.sh loading. Fixes moodlehq#309
1 parent 8d14f75 commit d204da6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
99
The format of this change log follows the advice given at [Keep a CHANGELOG](http://keepachangelog.com).
1010

1111
## [Unreleased]
12+
### Changed
13+
- Fixed nvm loading issue caused by upstream regression.
1214

1315
## [3.4.13] - 2023-09-02
1416
### Changed

src/Installer/VendorInstaller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function installNode()
129129
}
130130

131131
$nvmDir = getenv('NVM_DIR');
132-
$cmd = ". $nvmDir/nvm.sh && nvm install && nvm use && echo \"NVM_BIN=\$NVM_BIN\"";
132+
$cmd = ". $nvmDir/nvm.sh; nvm install && nvm use && echo \"NVM_BIN=\$NVM_BIN\"";
133133
$process = $this->execute->passThrough($cmd, $this->moodle->directory);
134134
if (!$process->isSuccessful()) {
135135
throw new \RuntimeException('Node.js installation failed.');

0 commit comments

Comments
 (0)