Skip to content

Commit

Permalink
fix: windows exit code with python (#2055)
Browse files Browse the repository at this point in the history
Closes #2048
  • Loading branch information
trim21 authored Apr 22, 2024
1 parent 395dc17 commit fc9f9ed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion maturin/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,10 @@ def script_exists(dir: str) -> bool:
print("Unable to find `maturin` script")
exit(1)

os.execv(maturin, [str(maturin)] + sys.argv[1:])
if sys.platform == "win32":
import subprocess

code = subprocess.call([str(maturin)] + sys.argv[1:])
sys.exit(code)
else:
os.execv(maturin, [str(maturin)] + sys.argv[1:])

0 comments on commit fc9f9ed

Please sign in to comment.