This commit is contained in:
John Mumm 2025-08-22 16:34:37 +01:00
parent 132f0bb892
commit ec49f65578
No known key found for this signature in database
GPG Key ID: 73D2271AFDC26EA8
1 changed files with 9 additions and 9 deletions

View File

@ -54,6 +54,8 @@ impl KeyringProvider {
/// keyring provider backend is `Native`. /// keyring provider backend is `Native`.
#[instrument(skip_all, fields(url = % url.to_string(), username))] #[instrument(skip_all, fields(url = % url.to_string(), username))]
pub async fn store_if_native(&self, url: &DisplaySafeUrl, credentials: &Credentials) { pub async fn store_if_native(&self, url: &DisplaySafeUrl, credentials: &Credentials) {
match &self.backend {
KeyringProviderBackend::Native => {
let Some(username) = credentials.username() else { let Some(username) = credentials.username() else {
trace!("Unable to store credentials in keyring for {url} due to missing username"); trace!("Unable to store credentials in keyring for {url} due to missing username");
return; return;
@ -63,8 +65,6 @@ impl KeyringProvider {
return; return;
}; };
match &self.backend {
KeyringProviderBackend::Native => {
// Only store credentials if not already stored during this uv invocation. // Only store credentials if not already stored during this uv invocation.
if !STORED_KEYRING_URLS.contains(url) { if !STORED_KEYRING_URLS.contains(url) {
self.store_native(url.as_str(), username, password).await; self.store_native(url.as_str(), username, password).await;