fix: Windows compatibility for cp-css.js and contributing docs#446
Open
Prakash21singh wants to merge 1 commit intothesysdev:mainfrom
Open
fix: Windows compatibility for cp-css.js and contributing docs#446Prakash21singh wants to merge 1 commit intothesysdev:mainfrom
Prakash21singh wants to merge 1 commit intothesysdev:mainfrom
Conversation
- replace new URL().pathname with fileURLToPath in cp-css.js to fix invalid path on Windows/Git Bash - add Windows setup section in CONTRIBUTING.md for pnpm script-shell fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Closes #445
On Windows/Git Bash,
cp-css.jscrashes due to an invalid path produced by new URL(import.meta.url).pathname. This fix replaces it with fileURLToPath which correctly resolves file:// URLs across all platforms.Additionally, a Windows setup section is added to CONTRIBUTING.md documenting the pnpm script-shell fix for users hitting shell command failures during pnpm install.
Changes
Replace new URL(import.meta.url).pathname with fileURLToPath(import.meta.url) in cp-css.js
Add Windows setup section in CONTRIBUTING.md with instructions to set pnpm script-shell to Git Bash
Test Plan
Verified locally on Windows 11 with Git Bash
Confirmed node cp-css.js runs without errors after the fix
Confirmed pnpm install completes successfully with the script-shell config set
Checklist
I linked a related issue, if applicable
I updated docs/README when needed
I considered backwards compatibility — fileURLToPath is a Node.js built-in available since v10, no breaking changes