Skip to content

Commit

Permalink
Fix nvm loading issue.
Browse files Browse the repository at this point in the history
We should not rely on success exit status from nvm.sh loading.

Fixes #309
  • Loading branch information
kabalin committed Aug 29, 2024
1 parent 8d14f75 commit d204da6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Installer/VendorInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down

0 comments on commit d204da6

Please sign in to comment.