Skip to content

chore: Fix regression of PowershellWmiCpuDetector#3127

Merged
timcassell merged 1 commit into
dotnet:masterfrom
filzrev:chore-fix-regression-cpudetector-for-windows
May 12, 2026
Merged

chore: Fix regression of PowershellWmiCpuDetector#3127
timcassell merged 1 commit into
dotnet:masterfrom
filzrev:chore-fix-regression-cpudetector-for-windows

Conversation

@filzrev
Copy link
Copy Markdown
Contributor

@filzrev filzrev commented May 12, 2026

This PR fix regression that introduced by #3122

That PR merge of Wmic/Cim command output parse logics.
But these changes are wrong and it cause Unknown processor on wmic.exe is not installed environment.

What's changed in this PR

1. CpuInfoParser.cs

  • Rename WmiCpuInfoParser to CpuInfoParser
  • Separate core parser logics to ParseCore
  • Add ParseCimOutput/ParseWmicOutput and rename caller method names.

2. PowershellWmiCpuDetector

  • Add Format-List {argList} to filter properties and ensure output is list format

3. CpuInfoParserTests_Cim.cs/CpuInfoParserTests_Wmic.cs

  • Revert PowershellWmiCpuInfoParserTests.cs‎ test contents and rename file.

@filzrev filzrev changed the title chore: fix-regression-of-windows-cpudetector chore: Fix regression of PowershellWmiCpuDetector May 12, 2026
@timcassell timcassell merged commit e83098e into dotnet:master May 12, 2026
11 checks passed
@timcassell timcassell added this to the v0.16.0 milestone May 12, 2026
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