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

fetchFromLegacy: fix crash on empty NETRC variable #42

Merged
merged 1 commit into from
Feb 17, 2024

Conversation

DavHau
Copy link
Member

@DavHau DavHau commented Dec 12, 2023

No description provided.

@@ -50,7 +50,7 @@ def try_fetch(url: str, package_name: str, package_filename: str) -> None:
# Parse username and password for this host from the netrc file if given.
username: Optional[str] = None
password: Optional[str] = None
if "NETRC" in os.environ:
if os.environ["NETRC"]:
Copy link
Member

Choose a reason for hiding this comment

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

This will fail on no NETRC envvar.
I think it's better to do if os.environ.get("NETRC"):

@adisbladis adisbladis merged commit 36f415d into nix-community:master Feb 17, 2024
15 checks passed
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.

None yet

2 participants