Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Jan 22, 2021

I recently pushed a commit to GitHub Actions. It failed for a perfectly valid reason, but when failing, test-windows reported -

Screen Shot 2021-01-23 at 9 28 54 am

The '-p' flag is meant to prevent this error, but I guess this doesn't work on Windows (https://en.wikipedia.org/wiki/Mkdir#Options)

So instead, this PR replaces 'mkdir' with a Python command. It also changes test.yml, just for symmetry.

See https://github.com/radarhere/Pillow/runs/1751747364?check_suite_focus=true for my failing case combined with this commit to produce a correct 'Prepare to upload errors'

@hugovk
Copy link
Member

hugovk commented Mar 7, 2021

I wonder if it failed due to using the pwsh shell? Does it work when not specifying a shell? Or using another one?

https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell

@radarhere
Copy link
Member Author

radarhere commented Mar 8, 2021

If I do not specify the shell, then it fails the same.
if I specify the cmd shell, then it fails with "The syntax of the command is incorrect."
If I specify the bash shell, that does work... it seems odd to using bash on Windows, but if you think that is simpler, I can update this.

@hugovk
Copy link
Member

hugovk commented Mar 8, 2021

If I specify the bash shell, that does work... it seems odd to using bash on Windows, but if you think that is simpler, I can update this.

Yes, let's go for this one. Thanks!

@radarhere radarhere force-pushed the mkdir_test_errors branch from 436b0f1 to 666d3c5 Compare March 8, 2021 11:21
@nulano
Copy link
Contributor

nulano commented Mar 8, 2021

Checking the help documents for mkdir in cmd and powershell, I have found that mkdir <path> -Force works in PowerShell.

@hugovk
Copy link
Member

hugovk commented Mar 8, 2021

Good to know, thanks! This'll do for now :)

@hugovk hugovk merged commit 2999628 into python-pillow:master Mar 8, 2021
@radarhere radarhere changed the title Replaced mkdir command with Python Updated shell for mkdir commands Mar 8, 2021
@radarhere radarhere deleted the mkdir_test_errors branch March 8, 2021 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants