diff --git a/src/Installer/VendorInstaller.php b/src/Installer/VendorInstaller.php index 3f1fb3bc..7f2f4b7a 100644 --- a/src/Installer/VendorInstaller.php +++ b/src/Installer/VendorInstaller.php @@ -120,13 +120,18 @@ public function installNode(): void } $nvmDir = getenv('NVM_DIR'); + $cmd = "set -x"; + + $process = $this->execute->passThroughProcess( + Process::fromShellCommandline($cmd, $this->moodle->directory, null, null, null) + ); $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) ); if (!$process->isSuccessful()) { - throw new \RuntimeException('Node.js installation failed.'); + throw new \RuntimeException('Node.js installation failed. Output: ' . $process->getOutput() . ' nvm dir: ' . (string) $nvmDir); } // Retrieve NVM_BIN from initialisation output, we will use it to // substitute right Node.js environment in all future process runs.