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
11 changes: 10 additions & 1 deletion packages/angular/cli/commands/version-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,16 @@ export class VersionCommand extends Command<VersionCommandSchema> {
private async getPackageManager(): Promise<string> {
try {
const manager = await getPackageManager(this.context.root);
const version = execSync(`${manager} --version`, { encoding: 'utf8', stdio: 'pipe' }).trim();
const version = execSync(`${manager} --version`, {
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'ignore'],
env: {
...process.env,
// NPM updater notifier will prevents the child process from closing until it timeout after 3 minutes.
NO_UPDATE_NOTIFIER: '1',
NPM_CONFIG_UPDATE_NOTIFIER: 'false',
},
}).trim();

return `${manager} ${version}`;
} catch {
Expand Down