Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix acceptance script paths on Windows - #14414

Merged
williammartin merged 1 commit into
trunkfrom
williammartin-investigate-windows-ci
Sep 10, 2026
Merged

Fix acceptance script paths on Windows#14414
williammartin merged 1 commit into
trunkfrom
williammartin-investigate-windows-ci

Conversation

@williammartin

Copy link
Copy Markdown
Member

Description

The acceptance harness extracts a script name from testscript's WORK directory. It used path.Base, which only recognizes slash-separated paths, so Windows backslash-separated paths were not reduced to their script-* basename. This caused every selected script to fail setup with script name not found.

Use filepath.Base so 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 extractScriptName in acceptance/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:

  • A human wrote it.
  • An agent wrote it under close human direction.
  • An agent wrote it independently, and no human has guided the implementation beyond the initial prompt.

Who answers review comments:

  • @williammartin will read and reply directly. Name the account.
  • An agent will draft replies and @username will read them before they are posted.
  • Nobody has explicitly committed to replying.

Copilot AI balanced review requested due to automatic review settings September 10, 2026 12:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity 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.Base with filepath.Base for WORK paths.
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.

Comment thread acceptance/acceptance_test.go
@williammartin
williammartin marked this pull request as ready for review September 10, 2026 12:25
@williammartin
williammartin requested a review from a team as a code owner September 10, 2026 12:25
@williammartin
williammartin merged commit 0ba226a into trunk Sep 10, 2026
26 checks passed
@williammartin
williammartin deleted the williammartin-investigate-windows-ci branch September 10, 2026 12:28
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