Repository navigation
Warn on logout when EMAILABLE_API_KEY is still set - #38
Merged
Merged
Conversation
Logout can't unset a variable in the parent shell, so an exported `EMAILABLE_API_KEY` kept authenticating every command after "Logged out." and logout looked broken. It now says so, as `gh auth logout` does for `GH_TOKEN`, and adds `api_key_env` to the JSON output.
There was a problem hiding this comment.
🟢 Approved
The implementation is focused, consistent with existing output conventions, and adequately tested.
0 open findings
What changed in this PR
Improves logout feedback when environment-based authentication remains active.
Changes:
- Adds a human-readable hint when
EMAILABLE_API_KEYis set. - Adds
api_key_env: trueto JSON output when applicable. - Tests human and JSON behavior with and without the variable.
| File | Description |
|---|---|
cmd/logout.go |
Detects and reports lingering environment authentication. |
cmd/logout_test.go |
Covers the new logout output variants. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Logout can't unset a variable in the parent shell, so an exported
EMAILABLE_API_KEYkept authenticating every command after "Logged out." and made logout look broken. It now says so, the waygh auth logoutdoes forGH_TOKEN, and--jsonoutput gainsapi_key_env: true.