Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ng-dev/release/publish/external-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,12 @@ export abstract class ExternalCommands {
}

try {
await ChildProcess.spawn('nvm', ['install'], {
// We must source nvm.sh so the shell recognizes the 'nvm' command since nvm is not a binary but a shell script.
await ChildProcess.spawn('. ~/.nvm/nvm.sh && nvm install', [], {
cwd: projectDir,
mode: 'on-error',
});

if (!quiet) {
const {stdout: nodeVersion} = await ChildProcess.spawn('node', ['--version']);
Log.info(green(` ✓ Set node version to ${nodeVersion}.`));
Expand Down
Loading