Skip to content

Commit

Permalink
Fixes python-poetry#6801, relay exit code when running script
Browse files Browse the repository at this point in the history
  • Loading branch information
rc-mattschwager committed Nov 2, 2022
1 parent d998dcd commit 7699c90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/poetry/console/commands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def run_script(self, script: str | dict[str, str], args: str) -> int:
"import sys; "
"from importlib import import_module; "
f"sys.argv = {args!r}; {src_in_sys_path}"
f"import_module('{module}').{callable_}()"
f"sys.exit(import_module('{module}').{callable_}())"
]

return self.env.execute(*cmd)

0 comments on commit 7699c90

Please sign in to comment.