diff --git a/src/QirRuntime/prerequisites.ps1 b/src/QirRuntime/prerequisites.ps1 index 43a7337012f..72ae1b5079c 100644 --- a/src/QirRuntime/prerequisites.ps1 +++ b/src/QirRuntime/prerequisites.ps1 @@ -2,10 +2,11 @@ # Licensed under the MIT License. if ($Env:ENABLE_QIRRUNTIME -ne "false") { - if (($IsWindows) -or ((Test-Path Env:AGENT_OS) -and ($Env:AGENT_OS.StartsWith("Win"))) -and - !(Get-Command clang -ErrorAction SilentlyContinue)) { - choco install llvm - choco install ninja + if (($IsWindows) -or ((Test-Path Env:AGENT_OS) -and ($Env:AGENT_OS.StartsWith("Win")))) { + if (!(Get-Command clang -ErrorAction SilentlyContinue)) { + choco install llvm + choco install ninja + } } elseif ($IsMacOS) { brew install ninja } else {