Skip to content

dotnet package search tests use default width - #7171

Merged
zivkan merged 4 commits into
devfrom
dev-zivkan-dotnet-search-tests-width
Mar 5, 2026
Merged

zivkan merged 4 commits into
devfrom
dev-zivkan-dotnet-search-tests-width

Conversation

@zivkan

@zivkan zivkan commented Feb 25, 2026

Copy link
Copy Markdown
Member

Bug

Fixes: NuGet/Home#14734

Description

dotnet package search detects the terminal width, and uses that for table formatting. Even when running tests, it was detecting the console width and adjusting the output, which breaks tests when the test assumes a specific width and the output doesn't match. On CI, since the CI agent is running headless, trying to get the console width throws, and then the table formatter uses the default width of 115.

So the fix is to make the tests tell the table formatter to always use the default width.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests existing tests cover the scenario
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc. N/A

@zivkan
zivkan requested a review from a team as a code owner February 25, 2026 11:05
nkolev92
nkolev92 previously approved these changes Feb 26, 2026
@zivkan
zivkan requested a review from nkolev92 March 3, 2026 19:02
@zivkan
zivkan merged commit a3f6e96 into dev Mar 5, 2026
16 checks passed
@zivkan
zivkan deleted the dev-zivkan-dotnet-search-tests-width branch March 5, 2026 06:10
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.

build.sh for NuGet.Client fails on Linux

3 participants