Skip to content

fix(cli): use shell-neutral env-var removal guidance - #754

Open
mangeshraut712 wants to merge 1 commit into
openai:mainfrom
mangeshraut712:fix/login-status-shell-neutral-env-guidance
Open

fix(cli): use shell-neutral env-var removal guidance#754
mangeshraut712 wants to merge 1 commit into
openai:mainfrom
mangeshraut712:fix/login-status-shell-neutral-env-guidance

Conversation

@mangeshraut712

Copy link
Copy Markdown
Contributor

Summary

login status and the post-login warning printed POSIX unset OPENAI_API_KEY ..., which is invalid in PowerShell. Windows users following that hint cannot drop the environment API keys that shadow a ChatGPT sign-in.

Fixes #33.

Changes

  • Added formatEnvironmentVariableRemovalGuidance() so the CLI prints shell-neutral wording (remove OPENAI_API_KEY and CODEX_API_KEY from the environment) instead of a POSIX command.
  • Used that helper for the login status path and the post-login / access-token warning that lists whichever shadowing keys are actually set.

Testing

  • bun test --timeout 30000 ./tests-ts/api-environment.test.ts ./tests-ts/cli-authentication.test.ts — 29 pass, 0 fail
  • pnpm run lint (tsc --noEmit) — exit 0

Risk and rollout

Documentation-only user-facing strings. No auth, scan, or credential-handling behavior change. Existing CLI authentication tests now assert the shell-neutral text and that unset no longer appears.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

login status and post-login warnings told users to run POSIX unset,
which is invalid in PowerShell. Print shell-neutral wording instead.
@chatgpt-codex-connector

Copy link
Copy Markdown

Note

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added the bug Something isn't working label Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

login status prints POSIX-only unset guidance on PowerShell

1 participant