diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index 2d8dbf2509a384..f5649b69bc14ca 100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -299,9 +299,16 @@ function withCondition( step: Record, condition: string, ): Record { + function maybeParens(condition: string) { + if (condition.includes("&&") || condition.includes("||")) { + return `(${condition})`; + } else { + return condition; + } + } return { ...step, - if: "if" in step ? `${condition} && (${step.if})` : condition, + if: "if" in step ? `${maybeParens(condition)} && (${step.if})` : condition, }; } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13ca1b15f7a34d..2c7df65b32b2be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -189,7 +189,7 @@ jobs: python-version: 3.11 if: '!(matrix.skip) && (matrix.os != ''linux'' || matrix.arch != ''aarch64'')' - name: Remove unused versions of Python - if: '!(matrix.skip) && (matrix.os != ''linux'' || matrix.arch != ''aarch64'' && (matrix.os == ''windows''))' + if: '!(matrix.skip) && ((matrix.os != ''linux'' || matrix.arch != ''aarch64'') && (matrix.os == ''windows''))' shell: pwsh run: |- $env:PATH -split ";" |