From cf365779cd7d4a9653007a16b54ae9f25fc25583 Mon Sep 17 00:00:00 2001 From: Matthew Hilton Date: Fri, 9 Aug 2024 12:05:41 +1000 Subject: [PATCH] workflow fork linking test --- src/Installer/VendorInstaller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Installer/VendorInstaller.php b/src/Installer/VendorInstaller.php index 3f1fb3bc..46bc35c3 100644 --- a/src/Installer/VendorInstaller.php +++ b/src/Installer/VendorInstaller.php @@ -120,13 +120,13 @@ public function installNode(): void } $nvmDir = getenv('NVM_DIR'); - $cmd = ". $nvmDir/nvm.sh && nvm install && nvm use && echo \"NVM_BIN=\$NVM_BIN\""; + $cmd = "set -x && . $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.