fix: check for a configured registry token, not npm whoami #2

Merged
jonnxor merged 1 commit from jonnxor/fix/registry-login-check into main 2026-10-26 18:25:48 +00:00 AGit
Owner

Fixes mise run release, which refused every time.

The bug: the script used npm whoami to check you were logged in. Forgejo's npm registry has no whoami endpoint and answers 404 even with a valid token, so the check could never pass. My release tests used a stand-in npm and didn't catch it.

The fix: the script now checks that a token is configured for the registry (in npm config list). Publishing is what proves the token works.

Checked:

  • 30 tests pass, including a new one for the no-token case, written first and seen failing.
  • On hades, the new check finds the token you configured.

After merging: git pull && mise run release.

🤖 Generated with Claude Code

Fixes `mise run release`, which refused every time. **The bug**: the script used `npm whoami` to check you were logged in. Forgejo's npm registry has no `whoami` endpoint and answers 404 even with a valid token, so the check could never pass. My release tests used a stand-in npm and didn't catch it. **The fix**: the script now checks that a token is configured for the registry (in `npm config list`). Publishing is what proves the token works. **Checked:** - 30 tests pass, including a new one for the no-token case, written first and seen failing. - On hades, the new check finds the token you configured. After merging: `git pull && mise run release`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix: check for a configured registry token, not npm whoami
All checks were successful
CI / check (pull_request) Successful in 45s
ea238649ff
Forgejo's npm registry has no whoami endpoint: it answers 404 even with a
valid token, so mise run release refused every time. Check that a token is
configured for the registry instead; the publish proves it is good.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
WAAAGH/jonnxor-brand!2
No description provided.