fix: only strip a literal "./" path prefix - #1664
Merged
Merged
Conversation
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>
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! |
Contributor
🦋 Changeset is good to goLatest commit: 4973feb We got this. Not sure what this means? Click here to learn what changesets are. |
nolag
enabled auto-merge (squash)
September 15, 2026 15:47
nolag
disabled auto-merge
September 15, 2026 15:47
nolag
enabled auto-merge (squash)
September 15, 2026 15:47
skudasov
approved these changes
Sep 15, 2026
Merged
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.
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/configcame back asconfig, 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.