Skip to content

Python script execution does not relay exit code #5773

Closed
@cwichel

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:

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?

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions