mirror of
https://github.com/schpet/linear-cli.git
synced 2026-09-14 14:26:50 +08:00
d1beb924e4
isKeyringAvailable() only probed on Linux and returned true unconditionally everywhere else, so on macOS the keyring round-trip always attempted a real write. Under ssh or an agent shell the login keychain has no UI session to unlock it, so 'security add-generic-password' fails with exit 36 (errSecInteractionNotAllowed) and 'deno task test' fails locally even though nothing is wrong with the code. Probe with 'security show-keychain-info', which is read-only and returns 36 in exactly that state. A read-only probe is not enough on its own: reads still succeed while locked (find-generic-password returns 44), so only a write-capable check detects it. The guard keys on 36 specifically rather than any nonzero exit, so a genuine keyring bug still fails the test loudly. CI is unaffected: its macOS keychain is unlocked, and the keyring job now sets LINEAR_KEYRING_INTEGRATION=1 to force the test to run, so a probe that ever wrongly reports 'unavailable' cannot quietly turn that job into a no-op.