Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit fail when python executable is not found #1236

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/rez/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ def find_pip_from_context(python_version, pip_version=None):

py_exe = find_python_in_context(context)

if not py_exe:
print_debug("Failed to locate python executable from context")

Choose a reason for hiding this comment

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

This log might be redundant I think. The _check_found function already logs when something isn't found and I also have a personal preference to let the caller log instead of letting the callee (find_pip_from_context) log.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, to me the log seemed consistent with code above and also acted as a comment for the return statement.

But I am fine with removing it.

Fixed in 2a64909

return None, None, context

proc = context.execute_command(
# -E and -s are used to isolate the environment as much as possible.
# See python --help for more details. We absolutely don't want to get
Expand Down