Fix acceptance script paths on Windows - #14414
Merged
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Add a focused test covering OS-native WORK paths and extractScriptName.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Lite
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
acceptance/acceptance_test.go — This changes a platform-specific parsing seam, but no test exercises extractScriptName with an… |
What changed in this PR
Fixes Windows acceptance script discovery by using OS-aware path handling.
Changes:
- Replaces
path.Basewithfilepath.BaseforWORKpaths.
| File | Description |
|---|---|
acceptance/acceptance_test.go |
Extracts script basenames using platform-native path separators. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.

Description
The acceptance harness extracts a script name from testscript's
WORKdirectory. It usedpath.Base, which only recognizes slash-separated paths, so Windows backslash-separated paths were not reduced to theirscript-*basename. This caused every selected script to fail setup withscript name not found.Use
filepath.Baseso the harness interprets paths according to the runner operating system.How did you test this change?
Not tested on Windows because I did not have a Windows environment available.
Key points
This deliberately makes only the path-package substitution. It does not change environment parsing or add separate regression coverage.
Notes for reviewers
Start with
extractScriptNameinacceptance/acceptance_test.go. The failure was observed in https://github.com/cli/cli/actions/runs/34473961928/job/102860167143.Authorship and follow-up
Who wrote this:
Who answers review comments: