mirror of https://github.com/astral-sh/uv
Merge 4149131711 into 0a83bf7dd5
This commit is contained in:
commit
900faeb29d
|
|
@ -503,14 +503,13 @@ impl Middleware for AuthMiddleware {
|
|||
.then_some(self.pyx_token_store.as_ref())
|
||||
.flatten()
|
||||
{
|
||||
let domain = store
|
||||
.api()
|
||||
.domain()
|
||||
.unwrap_or("pyx.dev")
|
||||
.trim_start_matches("api.");
|
||||
let login_param = match store.api().domain() {
|
||||
None | Some("api.pyx.dev") => "pyx.dev".to_owned(),
|
||||
Some(_) => format!("{}", Realm::from(store.api())),
|
||||
};
|
||||
Err(Error::Middleware(format_err!(
|
||||
"Run `{}` to authenticate uv with pyx",
|
||||
format!("uv auth login {domain}").green()
|
||||
format!("uv auth login {login_param}").green()
|
||||
)))
|
||||
} else {
|
||||
Err(Error::Middleware(format_err!(
|
||||
|
|
|
|||
Loading…
Reference in New Issue