Skip to content

add common pattern for directory specification#15108

Merged
brettfo merged 1 commit into
mainfrom
dev/brettfo/nuget-scan-global-json
May 21, 2026
Merged

add common pattern for directory specification#15108
brettfo merged 1 commit into
mainfrom
dev/brettfo/nuget-scan-global-json

Conversation

@brettfo
Copy link
Copy Markdown
Contributor

@brettfo brettfo commented May 21, 2026

Recently the discovery of global.json files was updated but I missed a common pattern of the job file listing "/.". The fix is simply to account for this in the pattern builder.

Fixes #15083

@brettfo brettfo marked this pull request as ready for review May 21, 2026 19:52
@brettfo brettfo requested a review from a team as a code owner May 21, 2026 19:52
Copilot AI review requested due to automatic review settings May 21, 2026 19:52
@github-actions github-actions Bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label May 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes NuGet updater global.json discovery when a job’s directories list includes the common root pattern "/.", ensuring SDK versions can still be detected and installed correctly (addressing #15083).

Changes:

  • Normalize update-directory patterns so "/." (which becomes "." after trimming) is treated as the repository root.
  • Add a regression test case covering directories: ["/."] for global.json discovery.
Show a summary per file
File Description
nuget/updater/common.ps1 Treats "." directory pattern as root to ensure directory regex matches repo root during global.json discovery.
nuget/updater/test.ps1 Adds coverage for the "/." root-directory pattern to prevent regressions.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@brettfo brettfo mentioned this pull request May 21, 2026
1 task
@brettfo brettfo force-pushed the dev/brettfo/nuget-scan-global-json branch from 4a38838 to b1d4aeb Compare May 21, 2026 20:03
@brettfo brettfo merged commit 6d2562b into main May 21, 2026
106 checks passed
@brettfo brettfo deleted the dev/brettfo/nuget-scan-global-json branch May 21, 2026 20:31
Copy link
Copy Markdown

@albertoblue87-netizen albertoblue87-netizen left a comment

Choose a reason for hiding this comment

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

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: dotnet:nuget NuGet packages via nuget or dotnet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for .NET 10.0.300 SDK

4 participants