fix(no-ticket): whoami exits 1 when not authenticated#321
Draft
BartoszBlizniak wants to merge 1 commit into
Draft
fix(no-ticket): whoami exits 1 when not authenticated#321BartoszBlizniak wants to merge 1 commit into
BartoszBlizniak wants to merge 1 commit into
Conversation
The whoami command previously always exited 0, even for anonymous (unauthenticated) requests, so scripts and CI pipelines had to parse the JSON output to detect authentication status. It now exits with code 1 when is_authenticated is false and 0 when true, across all output formats. Output is unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cloudsmith-iduffy
approved these changes
Jul 9, 2026
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.
Description
cloudsmith whoamialways exited with code 0, even when the request was anonymous. Scripts and CI pipelines could not rely on the exit code to verify credentials and instead had to parse--output-format jsonfor"is_authenticated": false.The command now exits with code 1 when
is_authenticatedis false and 0 when true, across all output formats (human,json,pretty_json).Includes new tests for the
whoamicommand (none existed previously): authenticated and anonymous cases.Type of Change
Additional Notes
(Release notes for this will be added at the end of merging the draft PRs)
Behavior change — flag in release notes: callers that run
whoamiwhile unauthenticated and expect exit 0 will now receive exit 1. This is the intended, correct behavior, since the exit code should reflect authentication status.