Open
Conversation
auth token now respects --output text when explicitly set, outputting just the access token string suitable for piping. JSON remains the default for backward compatibility. Also returns write errors instead of discarding them. Co-authored-by: Isaac
Suggested reviewersBased on git history of the changed files, these people are best suited to review:
Confidence: low Eligible reviewersBased on CODEOWNERS, these people or teams could also review: @andrewnester, @anton-107, @denik, @shreyas-goenka Suggestions based on git history of 2 changed files (2 scored). See CODEOWNERS for path-specific ownership rules. |
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.
Why
auth tokenalways outputs JSON, ignoring the--outputflag. If you want to pipe just the token string into another tool, you have to parse JSON. That's unnecessary friction for a common scripting pattern.Changes
auth tokennow respects--output textwhen explicitly set, outputting just the access token string (with a trailing newline) suitable for piping. JSON remains the default for backward compatibility.Only honors the explicit
--output textflag, not implicit text mode (e.g. fromDATABRICKS_OUTPUT_FORMAT), so existing scripts that parse JSON output won't break.Also fixes discarded write errors (
_, _replaced with proper error returns).Test plan
--output json, and--output textmodescmd/authtests pass