Skip to content

Commit fd25354

Browse files
MAINT: Fix two cases of code injection via template expansion (#39)
1 parent da0ef27 commit fd25354

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ jobs:
105105
106106
- name: pkg-config-for-win
107107
if: runner.os == 'windows'
108+
env:
109+
GITHUB_WORKSPACE: ${{ github.workspace }}
108110
run: |
109-
$CIBW = "${{ github.workspace }}/.openblas"
111+
$CIBW = "$env:GITHUB_WORKSPACE/.openblas"
110112
# pkgconfig needs a complete path, and not just "./openblas since the
111113
# build is run in a tmp dir (?)
112114
# It seems somewhere in the env passing, `\` is not
@@ -116,14 +118,16 @@ jobs:
116118
117119
- name: Setup macOS
118120
if: startsWith(matrix.buildplat[0], 'macos')
121+
env:
122+
BLAS_BACKEND: ${{ matrix.buildplat[2] }}
119123
run: |
120124
# Needed due to https://github.com/actions/runner-images/issues/3371
121125
# Supported versions: https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
122126
echo "FC=gfortran-15" >> "$GITHUB_ENV"
123127
echo "F77=gfortran-15" >> "$GITHUB_ENV"
124128
echo "F90=gfortran-15" >> "$GITHUB_ENV"
125129
126-
if [[ ${{ matrix.buildplat[2] }} == 'accelerate' ]]; then
130+
if [[ "$BLAS_BACKEND" == 'accelerate' ]]; then
127131
# Builds with Accelerate only target macOS>=14.0
128132
echo "CIBW_ENVIRONMENT_MACOS=MACOSX_DEPLOYMENT_TARGET=14.0 INSTALL_OPENBLAS=false" >> "$GITHUB_ENV"
129133
else

0 commit comments

Comments
 (0)