Skip to content

Conversation

500-internal-server-error

Reference: npm#30

This PR is based on the PR above, and also fixes the NODE_PATH pnpm additionally seems to rely on that npm does not. pnpm run test completes with no issues, though I am unsure how to build the entirety of pnpm with these changes for further testing.

@zkochan zkochan requested a review from Copilot April 21, 2025 22:53
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses issues with generating shell script shims on Cygwin, MSYS2, and MinGW environments, and also updates the NODE_PATH normalization logic required by pnpm.

  • Introduces an isCygwin helper function for environment detection.
  • Updates shell shim generation to handle MINGW and MSYS conditions.
  • Adjusts the NODE_PATH normalization to differentiate between Cygwin (/proc/cygdrive) and Windows (/mnt) environments.
Files not reviewed (2)
  • test/snapshots/e2e.test.js.snap: Language not supported
  • test/snapshots/test.js.snap: Language not supported
Comments suppressed due to low confidence (1)

src/index.ts:675

  • Verify that using '/proc/cygdrive' for Cygwin environments is consistent with all use cases and does not lead to unexpected path resolution issues, especially compared to the default '/mnt' behavior on Windows.
const posix = isWindows() ? split[i].split('\').join('/').replace(/^([^:\/]*):/, (_, $1) => `${isCygwin() ? '/proc/cygdrive' : '/mnt'}/${$1.toLowerCase()}`) : split[i]

@zkochan zkochan merged commit 36d9c66 into pnpm:main Apr 21, 2025
1 check passed
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