Read anonymously when a saved login is rejected
A stale login made every read fail, and search blamed the registry for it. Reads now warn and retry without the login; publishing never does. A refused or missing package after the fallback reports the rejected login, so a private package can't be replaced from a lower channel. Search shows the real error, and the README no longer says Gitea lacks the catalog API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
83e694c6c4
commit
2026319f61
5 files changed
+190
-25
No files matched your search
+3
-3
@@ -875,8 +875,8 @@ async fn cmd_search(ctx : Ctx, term : String) -> Unit raise OrbitError {
|
||||
let mut listed = 0
|
||||
for ch in ctx.channels {
|
||||
let repos = list_repos(ch) catch {
|
||||
_ => {
|
||||
println("warning: channel '\{ch.name}' does not allow listing packages")
|
||||
OrbitError(msg) => {
|
||||
println("warning: cannot list channel '\{ch.name}': \{msg}")
|
||||
continue
|
||||
}
|
||||
}
|
||||
@@ -913,7 +913,7 @@ async fn cmd_search(ctx : Ctx, term : String) -> Unit raise OrbitError {
|
||||
}
|
||||
if listed == 0 {
|
||||
raise OrbitError(
|
||||
"no channel allows listing packages (catalog API); try `orbit versions <name>`",
|
||||
"no channel could be listed; if you know the package name, try `orbit versions <name>`",
|
||||
)
|
||||
}
|
||||
if rows.length() == 1 {
|
||||
|
||||
Reference in new issue
Block a user