Skip to content
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

Updated shell for mkdir commands #5219

Merged
merged 1 commit into from
Mar 8, 2021

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!

@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.

None yet

3 participants