Skip to content

fix: only strip a literal "./" path prefix - #1664

Merged
nolag merged 2 commits into
mainfrom
rtinianov/fix-single-char-path-prefix-strip
Sep 15, 2026
Merged

nolag merged 2 commits into
mainfrom
rtinianov/fix-single-char-path-prefix-strip

Conversation

@nolag

@nolag nolag commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

The prefix-stripping regex in normalizePath had an unescaped dot, so /^.\// matched any single character followed by a slash rather than just "./".

Any module under a single-character top-level directory was reported without it: x/config came back as config, and every consumer of the output then failed on a directory that does not exist, e.g. golangci-lint with "working-directory (config) was not a path" and setup-go with "The specified go version file at: config/go.mod does not exist".

Multi-character top-level directories were unaffected, which is why this went unnoticed: "pkg/" has no slash in its second position.

The prefix-stripping regex in normalizePath had an unescaped dot, so `/^.\//`
matched any single character followed by a slash rather than just "./".

Any module under a single-character top-level directory was reported without
it: `x/config` came back as `config`, and every consumer of the output then
failed on a directory that does not exist, e.g. golangci-lint with
"working-directory (config) was not a path" and setup-go with "The specified go
version file at: config/go.mod does not exist".

Multi-character top-level directories were unaffected, which is why this went
unnoticed: "pkg/" has no slash in its second position.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@nolag
nolag requested a review from a team as a code owner September 15, 2026 15:14
@github-actions

Copy link
Copy Markdown
Contributor

👋 nolag, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

🦋 Changeset is good to go

Latest commit: 4973feb

We got this.

Not sure what this means? Click here to learn what changesets are.

@nolag
nolag enabled auto-merge (squash) September 15, 2026 15:47
@nolag
nolag disabled auto-merge September 15, 2026 15:47
@nolag
nolag enabled auto-merge (squash) September 15, 2026 15:47
@nolag
nolag merged commit bd812a3 into main Sep 15, 2026
19 checks passed
@nolag
nolag deleted the rtinianov/fix-single-char-path-prefix-strip branch September 15, 2026 15:51
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