Skip to content

fix: Windows compatibility for cp-css.js and contributing docs#446

Open
Prakash21singh wants to merge 1 commit intothesysdev:mainfrom
Prakash21singh:fix/windows-setup-gitbash
Open

fix: Windows compatibility for cp-css.js and contributing docs#446
Prakash21singh wants to merge 1 commit intothesysdev:mainfrom
Prakash21singh:fix/windows-setup-gitbash

Conversation

@Prakash21singh
Copy link
Copy Markdown

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

- 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
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.

Windows compatibility issues in cp-css.js and openui-cli build:templates script

1 participant