Skip to content

fix: display the correct response for coder list #16547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

evgeniy-scherbina
Copy link
Contributor

@evgeniy-scherbina evgeniy-scherbina commented Feb 12, 2025

Closes #16312

We intend to modify the behavior of the CLI handler based on the specified output format. However, the output format is currently only accessible within the OutputFormatter structure. Therefore, I propose extending OutputFormatter by introducing a public FormatID method, which will allow us to retrieve the format identifier and use it to customize the behavior of the CLI handler accordingly.

An alternative approach would be to make the implementation more generic. Instead of defining a FormatID method, we could introduce an IsMachineReadableFormat() bool method. This method would indicate whether the output format is machine-readable, allowing us to adjust the CLI handler's behavior accordingly.

Copy link

github-actions bot commented Feb 12, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@evgeniy-scherbina
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@evgeniy-scherbina evgeniy-scherbina marked this pull request as ready for review February 13, 2025 14:38
Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

Minor nit to add a comment 👍

@evgeniy-scherbina evgeniy-scherbina merged commit 981cf8c into main Feb 13, 2025
30 checks passed
@evgeniy-scherbina evgeniy-scherbina deleted the 16312-coder-cli branch February 13, 2025 15:13
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: coder list -o json returns no value but a json is expected
2 participants