ofek / pyapp

Runtime installer for Python applications
https://ofek.dev/pyapp/
1.17k stars 27 forks source link

Incorrect exit code #83

Closed TobyGiacometti closed 5 months ago

TobyGiacometti commented 7 months ago

While using the standalone Hatch binaries, I noticed that in some circumstances the exit code is incorrect. For more information, please check following issue: https://github.com/juftin/hatch-pip-compile/issues/66

ofek commented 7 months ago

Can you please provide exact steps for me to reproduce?

TobyGiacometti commented 7 months ago
cd /tmp
wget https://github.com/pypa/hatch/releases/download/hatch-v1.9.3/hatch-1.9.3-x86_64-unknown-linux-gnu.tar.gz
tar -xzf "$(basename "$_")"
sudo install hatch-1.9.3-x86_64-unknown-linux-gnu /usr/local/bin/hatch
mkdir /tmp/hatch-pip-compile-test
cd "$_"
cat <<'EOF' >hatch.toml
[env]
requires = [ "hatch-pip-compile" ]

[envs.default]
type = "pip-compile"
dependencies = [ "pyinfra>=2.9" ]
EOF
PIP_COMPILE_DISABLE=1 hatch -v env run --env default -- python --version
printf "%s\n" "$?"

When Hatch is installed through pip directly, the exit code of the hatch run command is correct (1), when using the standalone binary, it is incorrect (0).

ofek commented 5 months ago

https://github.com/pypa/hatch/pull/1389

TobyGiacometti commented 4 months ago

Thank you!