-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Do not use cmd shell in GitHub Actions #9327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| setlocal EnableDelayedExpansion | ||
| for %%f in (winbuild\build\license\*) do ( | ||
| set x=%%~nf | ||
| rem Skip FriBiDi license, it is not included in the wheel. | ||
| set fribidi=!x:~0,7! | ||
| if NOT !fribidi!==fribidi ( | ||
| rem Skip imagequant license, it is not included in the wheel. | ||
| set libimagequant=!x:~0,13! | ||
| if NOT !libimagequant!==libimagequant ( | ||
| echo. >> LICENSE | ||
| echo ===== %%~nf ===== >> LICENSE | ||
| echo. >> LICENSE | ||
| type %%f >> LICENSE | ||
| ) | ||
| ) | ||
| ) | ||
| call winbuild\\build\\build_env.cmd | ||
| %pythonLocation%\python.exe -m cibuildwheel . --output-dir wheelhouse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can keep this chunk, it doesn't declare shell: cmd so will default to pwsh.
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#defaultsrunshell
And zizmor doesn't complain about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the case. The shell: cmd on line 220 is related to this block.
I've separated this change out from the other changes, and you can see that without it, zizmor does complain - https://results.pre-commit.ci/run/github/5171600/1765401638.xj0JlAmBT_6lRfMDGmxoqQ
#9318 upgraded zizmor to include https://docs.zizmor.sh/audits/#obfuscation
This PR allows for that by