File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -299,9 +299,16 @@ function withCondition(
299299 step : Record < string , unknown > ,
300300 condition : string ,
301301) : Record < string , unknown > {
302+ function maybeParens ( condition : string ) {
303+ if ( condition . includes ( "&&" ) || condition . includes ( "||" ) ) {
304+ return `(${ condition } )` ;
305+ } else {
306+ return condition ;
307+ }
308+ }
302309 return {
303310 ...step ,
304- if : "if" in step ? `${ condition } && (${ step . if } )` : condition ,
311+ if : "if" in step ? `${ maybeParens ( condition ) } && (${ step . if } )` : condition ,
305312 } ;
306313}
307314
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ jobs:
189189 python-version : 3.11
190190 if : ' !(matrix.skip) && (matrix.os != '' linux'' || matrix.arch != '' aarch64'' )'
191191 - name : Remove unused versions of Python
192- if : ' !(matrix.skip) && (matrix.os != '' linux'' || matrix.arch != '' aarch64'' && (matrix.os == '' windows'' ))'
192+ if : ' !(matrix.skip) && (( matrix.os != '' linux'' || matrix.arch != '' aarch64'' ) && (matrix.os == '' windows'' ))'
193193 shell : pwsh
194194 run : |-
195195 $env:PATH -split ";" |
You can’t perform that action at this time.
0 commit comments