Problems Parsing Commands in Bash Shell #6856
Unanswered
adam-grant-hendry
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First noticed in
msys2/MINGW-packagesIssue #13662, usingpoetry runin with the bash shell in GitHub Action CI exhibits strange behavior in specific cases with strings.In
commitizenPR #605, the following commands fail in GitHub Actions CI:(NOTE: The commands are the same, but one is tested with single-quotes and the other with double-quotes.)
$ poetry run python -m pydocstyle --convention=google --add-ignore=D1,D415 --match-dir='^(?![.]|venv).*'Link to Failing CI Run: https://github.com/commitizen-tools/commitizen/actions/runs/3292900770/jobs/5428806135
Expected Output: Runs and passes (no output)
Actual Output:
'venv).*' is not recognized as an internal or external command, operable program or batch file.$ poetry run python -m pydocstyle --convention=google --add-ignore=D1,D415 --match-dir="^(?![.]|venv).*"Link to Failing CI Run: https://github.com/commitizen-tools/commitizen/actions/runs/3293015007/jobs/5429057413
Expected Output: Runs and passes (no output)
Actual Output:
'venv).*' is not recognized as an internal or external command, operable program or batch file.error_03.mp4
Any help would be greatly appreciated.
System Details
OS: determined with
cmd.exe /c verGit: determined with
git --versionBash: determined with
uname:Initial Thoughts
If
subprocess.Popenis a culprit, this opens a child process in Command Prompt since python looks at the Windows environment variableCOMSPECto determine which shell to run.If
poetry runis usingsubprocess.Popen, it could be opening a child Command Prompt shell, which doesn't always work well with single quotes. See:Beta Was this translation helpful? Give feedback.
All reactions