Fix Windows CI: skip bash-path-incompatible test on win32#16
Merged
Conversation
…tibility) Co-authored-by: pangerlkr <73515951+pangerlkr@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing CI checks for Node versions
Fix Windows CI: skip bash-path-incompatible test on win32
Mar 12, 2026
There was a problem hiding this comment.
Pull request overview
This PR fixes failing Windows CI by skipping a bash-path-sensitive hook test on win32, aligning with other platform-conditional tests in the hooks test suite.
Changes:
- Add a Windows-only early return to skip the
detect-project writes project metadata...test when running onwin32.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| await asyncTest('detect-project writes project metadata to the registry and project directory', async () => { | ||
| if (process.platform === 'win32') { | ||
| console.log(' (skipped — bash script paths are not Windows-compatible)'); | ||
| return true; |
There was a problem hiding this comment.
The skip guard returns true, but asyncTest() ignores the callback’s return value (it only awaits it). For consistency with other skips in this file (which just return;) and to avoid implying the return value is meaningful, consider using return; here as well.
Suggested change
| return true; | |
| return; |
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.
All Windows CI test jobs were failing with 1 test out of 1050 — the
detect-project writes project metadata to the registry and project directorytest intests/hooks/hooks.test.js.Root cause
The test builds a bash shell command string by embedding
path.join()-generated paths directly:On Windows,
path.join()returns backslash-separated paths. Inside a bash command string,\r,\U, etc. are interpreted as escape sequences —cdsilently fails,sourcenever runs, and noproject.jsonis written.Fix
Add a
process.platform === 'win32'early-return guard, matching the existing pattern for other bash-script tests in this file:detect-project.shis a Unix bash script; testing its execution on Windows via embedded shell command strings is not meaningful.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.