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
2 changes: 1 addition & 1 deletion ng-dev/release/publish/external-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export abstract class ExternalCommands {
// but a shell function. The dot (.) built-in and && operator require shell: true here.
// We redirect stdout of nvm install to stderr so that stdout only contains the result of nvm which.
const {stdout} = await ChildProcess.spawn(
'. ~/.nvm/nvm.sh && nvm install >&2 && nvm which',
'. ~/.nvm/nvm.sh && nvm install >&2 && nvm which --silent',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The command string uses several bash-specific features (e.g., the . built-in, the ~ home directory shortcut, and sourcing a .sh file) which are not compatible with Windows. This violates the general rule that ng-dev tooling should be compatible with Windows.

Additionally, please note that the --silent flag for nvm which was introduced in nvm v0.39.0. If users are running an older version of nvm, this command will treat --silent as a version argument, fail to find it, and print an error to stdout, which would break the nodeBinPath detection.

References
  1. ng-dev tooling is expected to be compatible with Windows.

[],
{
cwd: projectDir,
Expand Down
Loading