Skip to content

Conversation

@fenkes-ibm
Copy link
Contributor

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)

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failing.

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.
@fenkes-ibm
Copy link
Contributor Author

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

Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gaborbernat gaborbernat enabled auto-merge (squash) May 13, 2024 17:16
@fenkes-ibm
Copy link
Contributor Author

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

@gaborbernat gaborbernat merged commit 09c1c69 into pypa:main May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants