pypa / virtualenv

Virtual Python Environment builder
https://virtualenv.pypa.io
MIT License
4.78k stars 1.02k forks source link

Fix bad return code in bash activation if hashing is disabled #2717

Closed fenkes-ibm closed 3 months ago

fenkes-ibm commented 3 months ago

If hashing is disabled in bash, the hash command will return a nonzero return code. Since it is the last command in the script that return code will also be the "return code" of the source command, so if anyone uses

source activate.sh || die horribly

having hashing disabled will ruin their day.

Fix this by overriding the return code of hash if it's bad. Add tests to verify a good return code and try with and without hashing.

Thanks for contributing, make sure you address all the checklists (for details on how see development documentation)

fenkes-ibm commented 3 months ago

Ah, looks like I wedged in before #2721. Rebased, let's try again.

fenkes-ibm commented 3 months ago

brew@3.11 on macos timed out? :raised_eyebrow: maybe it just had a bad day and needs a rerun?