fix(sync): include backend name in bundled-creds auth recommendation (#124)

Problem: `with_token()` recommended the generic `:Pending auth` when
credentials were missing, even though the backend was already known.

Solution: append the backend name so the message reads e.g.
`:Pending auth gtasks` instead of `:Pending auth`.
This commit is contained in:
Barrett Ruth 2026-03-10 11:43:51 -04:00 committed by GitHub
parent be3d9b777e
commit fec03b3dcd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,7 +47,7 @@ function M.with_token(client, name, callback)
if not token then if not token then
local creds = client:resolve_credentials() local creds = client:resolve_credentials()
if creds.client_id == BUNDLED_CLIENT_ID then if creds.client_id == BUNDLED_CLIENT_ID then
log.warn(name .. ': No credentials configured — run :Pending auth.') log.warn(name .. ': No credentials configured — run :Pending auth ' .. name)
return return
end end
log.info(name .. ': Not authenticated — starting auth flow...') log.info(name .. ': Not authenticated — starting auth flow...')