mirror of https://github.com/astral-sh/uv
This commit is contained in:
parent
132f0bb892
commit
ec49f65578
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue