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

Handle ~/.netrc being a directory gracefully. #72

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

jsirois
Copy link
Contributor

@jsirois jsirois commented Jul 24, 2024

Previously, this would cause fetcher code to fail when setting up
authentication.

Fixes #71

Previously, this would cause fetcher code to fail when setting up
authentication.

Fixes a-scie#71
@jsirois jsirois requested review from kaos, benjyw and huonw July 24, 2024 19:52
home_dir = tmp_path / "home"
monkeypatch.setenv("HOME", str(home_dir))
(home_dir / ".netrc").mkdir(parents=True)
assert_fetch()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prior to the fix, this assertion failed with a backtrace like the issue OP.

Copy link
Collaborator

@benjyw benjyw left a comment

Choose a reason for hiding this comment

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

I'd never seen a ~/.netrc directory, you learn something new every day.

@jsirois jsirois merged commit ee96f10 into a-scie:main Jul 24, 2024
6 checks passed
@jsirois jsirois deleted the issues/71 branch July 24, 2024 22:16
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.

science blows up when ~/.netrc is a directory.
2 participants