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
parent 625ee01074
commit 17d31c0fc2

View file

@ -47,7 +47,7 @@ function M.with_token(client, name, callback)
if not token then
local creds = client:resolve_credentials()
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
end
log.info(name .. ': Not authenticated — starting auth flow...')