Skip to content

Suppress gh stderr leak when GitHub token is missing#151

Open
angihe93 wants to merge 1 commit intoflowglad:mainfrom
angihe93:angihe93/fix-github-token-req
Open

Suppress gh stderr leak when GitHub token is missing#151
angihe93 wants to merge 1 commit intoflowglad:mainfrom
angihe93:angihe93/fix-github-token-req

Conversation

@angihe93
Copy link
Copy Markdown

@angihe93 angihe93 commented Apr 9, 2026

Summary

  • Redirect stderr to /dev/null when spawning gh auth token so its "no oauth token found" message doesn't leak to the user's terminal
  • Improve the validation error message to suggest gh auth login as a fix

Test plan

  • Run onton --gameplan ... without GITHUB_TOKEN set and without gh auth login — confirm only onton's error appears, no gh stderr leak
  • Run with a valid token (env var or gh auth) — confirm token resolution still works

🤖 Generated with Claude Code

When `gh auth token` fails it prints "no oauth token found for github.com"
to stderr, which leaks into the user's terminal before onton's own error.
Redirect stderr to /dev/null during the gh subprocess and improve the
validation error message to suggest `gh auth login`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

@angihe93 is attempting to deploy a commit to the Flowglad Team on Vercel.

A member of the Team first needs to authorize it.

@angihe93 angihe93 requested a deployment to claude-review-fork April 9, 2026 23:55 — with GitHub Actions Waiting
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant