Python script execution does not relay exit code #5773
Closed
Description
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: Windows 10 (Build 19044)
- Poetry version: 1.2.0b1
- Link of a Gist with the contents of your pyproject.toml file: Not required.
Issue
Note:
- This could be related to issues poetry run does not relay exit code #2369 Relay exit code in poetry run #2904 exit with callable return code in generated script #4456
- Also, a related PR was opened on POE project #71
Poetry is not relaying the exit codes when running python scripts on the console:
> poetry run python -c "import sys; sys.exit(1)"
> echo %errorlevel%
0
But if I execute it directly...
> python -c "import sys; sys.exit(1)"
> echo %errorlevel%
1
Is this the expected behavior?