Skip to content

[netrc] Use the most recent match for auth #6811

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

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

yim-lee
Copy link
Contributor

@yim-lee yim-lee commented Aug 14, 2023

Motivation:
We update netrc by appending new entry to the end of the file (we don't delete or modify existing entries). This means when we look for entries matching a given host in the netrc file, we should use the last match for the most recent entry.

Modification:
Check netrc lookup to use last instead of first match.

Motivation:
We update `netrc` by appending new entry to the end of the file (we don't delete or modify existing entries). This means when we look for entries matching a given host in the `netrc` file, we should use the _last_ match for the most recent entry.

Modification:
Check `netrc` lookup to use `last` instead of `first` match.
@yim-lee
Copy link
Contributor Author

yim-lee commented Aug 14, 2023

@swift-ci please smoke test

@yim-lee yim-lee merged commit bc936db into swiftlang:main Aug 15, 2023
@yim-lee yim-lee deleted the netrc-recent branch August 15, 2023 18:38
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