Skip to content

Conversation

@MRagunandhan24
Copy link

Problem:

This pull request is aimed at npm/cli#6606. Currently if the project path includes a colon npx and npm exec will fail to find installed packages with no explanation.

Solution:

Added a warning message so that people can understand about the delimiter present in the path.

References

@MRagunandhan24 MRagunandhan24 changed the title Fixes 6606, shows a warning when a delimiter is present in the path fix: show warning when path contains delimiter (#6606) Jan 20, 2026
@MRagunandhan24 MRagunandhan24 marked this pull request as ready for review January 21, 2026 18:37
@MRagunandhan24 MRagunandhan24 requested a review from a team as a code owner January 21, 2026 18:37
lib/set-path.js Outdated
if (binPaths) {
for (const bin of binPaths) {
if (bin.includes(delimiter)) {
log.warn('exec', 'Project path contains delimiter (":"), npx may not behave as expected.')
Copy link
Member

Choose a reason for hiding this comment

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

This is not npx, this is used in other places. We will need to make the message more generic to cover all use cases (npm exec, npm run).

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for the input ! , Now I've modified the message to include the event that triggered this warning to provide useful information. Requesting your feedback on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants