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

$HOME environment variable is required for .netrc detection in tests #103

Closed
chrisirhc opened this issue Aug 8, 2024 · 4 comments · Fixed by #105
Closed

$HOME environment variable is required for .netrc detection in tests #103

chrisirhc opened this issue Aug 8, 2024 · 4 comments · Fixed by #105

Comments

@chrisirhc
Copy link
Contributor

chrisirhc commented Aug 8, 2024

Found this out as I was investigating why the authentication wouldn't work only on the test of the pip_compile.
Creating an issue in case it would be helpful to another person. To add it, add --test_env=HOME such as in .bazelrc.

It might be worth adding this to the README in case someone else hits this issue.

Related ticket gribouille/netrc#4 .

@chrisirhc chrisirhc changed the title Add note that $HOME environment variable is required for .netrc detection in tests $HOME environment variable is required for .netrc detection in tests Aug 8, 2024
@mark-thm mark-thm closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2024
@chrisirhc
Copy link
Contributor Author

chrisirhc commented Aug 9, 2024

Hm curious why not add a note to readme on this?

@mark-thm
Copy link
Contributor

mark-thm commented Aug 9, 2024

Ah, sorry, I meant to leave a message when I closed this -- this seems like something not particular to this ruleset but more general w/r/t how Bazel and .netrc interact. Open to adding a line to the README, seemed like an odd place, though, and your issue captures the thing to do.

@chrisirhc
Copy link
Contributor Author

chrisirhc commented Aug 9, 2024

Ah I didn’t mention that this can be confusing to users who are coming from pip (rules_python) since pip has a workaround that detects .netrc without the $HOME variable.

@chrisirhc
Copy link
Contributor Author

chrisirhc commented Aug 12, 2024

Found a clean way to inherit $HOME, created a #105 .

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 a pull request may close this issue.

2 participants