Pillow: GHA Windows: "Unexpected token '-m' in expression or statement"

Created on 25 Oct 2019  路  2Comments  路  Source: python-pillow/Pillow

The GitHub Actions for Windows have started failing:

pip install wheel pytest pytest-cov codecov
##[error]Process completed with exit code 1.
Run "%pythonLocation%\python.exe" -m pip install wheel pytest pytest-cov
At D:\a\_temp\a98eeb94-97c8-4e47-98bc-484365b814d3.ps1:2 char:31
+ "%pythonLocation%\python.exe" -m pip install wheel pytest pytest-cov
+                               ~~
Unexpected token '-m' in expression or statement.
At D:\a\_temp\a98eeb94-97c8-4e47-98bc-484365b814d3.ps1:2 char:34
+ "%pythonLocation%\python.exe" -m pip install wheel pytest pytest-cov
+                                  ~~~
Unexpected token 'pip' in expression or statement.
+ CategoryInfo          : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : UnexpectedToken

##[error]Process completed with exit code 1.

Last pass, 2 days ago: https://github.com/python-pillow/Pillow/runs/271449412

First fail, 10 hours ago: https://github.com/python-pillow/Pillow/runs/274142713

Coincided with https://github.com/python-pillow/Pillow/issues/4166 on macOS.

Bug Build Windows

Most helpful comment

Thanks, looks good! #4168

All 2 comments

It looks like the default Windows shell was changed from cmd to powershell. Adding shell: cmd to every step which doesn't specify a shell should fix this (I don't have time to test this today.)

https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#using-a-specific-shell

Thanks, looks good! #4168

Was this page helpful?
0 / 5 - 0 ratings