Don't warn when an anonymous read succeeds
A rejected login is now an error when it matters and silent otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c8d7f59633
commit
e2f0ac27e1
2 files changed
+3
-8
No files matched your search
+2
-7
@@ -547,13 +547,8 @@ async fn bearer_token_or_anonymous(
|
||||
}
|
||||
match fetch_bearer_token(token_url, None) {
|
||||
Ok(tok) => {
|
||||
if !rejected_logins.contains(host) {
|
||||
rejected_logins[host] = rejected
|
||||
let start = if c_isatty(2) != 0 { "\r\u001B[2K" } else { "" }
|
||||
c_print_err(
|
||||
utf8_encode("\{start}warning: \{rejected}; reading anonymously\n"),
|
||||
)
|
||||
}
|
||||
// Stay quiet: the login is only reported if the anonymous read isn't enough.
|
||||
rejected_logins[host] = rejected
|
||||
tok
|
||||
}
|
||||
Err(_) => raise OrbitError(rejected)
|
||||
|
||||
Reference in new issue
Block a user