Skip to content

Commit 5972f77

Browse files
committed
Fix WmicCpuDetector being chosen if not available
1 parent 3fbf726 commit 5972f77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BenchmarkDotNet/Detectors/Cpu/Windows/WmicCpuDetector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal class WmicCpuDetector : ICpuDetector
1313
{
1414
private const string DefaultWmicPath = @"C:\Windows\System32\wbem\WMIC.exe";
1515

16-
public bool IsApplicable() => OsDetector.IsWindows();
16+
public bool IsApplicable() => OsDetector.IsWindows() && File.Exists(DefaultWmicPath);
1717

1818
public CpuInfo? Detect()
1919
{

0 commit comments

Comments
 (0)