The venv pex
script handles entrypoint functions differently from PEX.
#1241
Labels
pex
script handles entrypoint functions differently from PEX.
#1241
Currently
PEX
uses the return value of the entry point function:https://github.com/pantsbuild/pex/blob/2df133378a4f9e8bb3c6966d824465e57c66ba72/pex/pex.py#L476-L479
https://github.com/pantsbuild/pex/blob/2df133378a4f9e8bb3c6966d824465e57c66ba72/pex/pex.py#L645-L651
Which was introduced here:
eac0233#diff-07a90ebaf117fe2a7d1010d8dbe6ed42fab40761f07622b3dba999b2e2dbce78R349-R351
And the
pex
venv script does not:https://github.com/pantsbuild/pex/blob/2df133378a4f9e8bb3c6966d824465e57c66ba72/pex/tools/commands/venv.py#L236-L248
After consideration it seems sticking with the change in #605 and bringing the
pex
venv script in line with thePEX
behavior is the best way forward. Existing users expecting this behavior won't be broken this way and the surprisingly (to me) flexible behavior ofsys.exit
makes this work like you want in most imaginable scenarios (clearly by design on the part of stdlib authors). The behavior though should be better documented.The text was updated successfully, but these errors were encountered: