Skip to content

Commit a03038e

Browse files
committed
fix(ng-dev): ensure node version check uses project directory after nvm install
Sets the working directory to the project directory and enables silent mode when retrieving the Node.js version. This ensures that the logged version correctly reflects project-specific configurations like those in an `.nvmrc` file.
1 parent 9f1bfdc commit a03038e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ng-dev/release/publish/external-commands.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ export abstract class ExternalCommands {
209209
});
210210

211211
if (!quiet) {
212-
const {stdout: nodeVersion} = await ChildProcess.spawn('node', ['--version']);
212+
const {stdout: nodeVersion} = await ChildProcess.spawn('node', ['--version'], {
213+
mode: 'silent',
214+
cwd: projectDir,
215+
});
213216
Log.info(green(` ✓ Set node version to ${nodeVersion}.`));
214217
}
215218
} catch (e) {

0 commit comments

Comments
 (0)