Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CLI: coder list -o json returns no value but a json is expected #16312

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

Closed
bjornrobertsson opened this issue Jan 28, 2025 · 0 comments · Fixed by #16547
Closed

CLI: coder list -o json returns no value but a json is expected #16312

bjornrobertsson opened this issue Jan 28, 2025 · 0 comments · Fixed by #16547
Assignees
Labels
cli Area: CLI customer-reported Bugs reported by enterprise customers. Only humans may set this.

Comments

@bjornrobertsson
Copy link

The expected returning value should be (on stdout):
{"workspaces":[],"count":0}

End user runs:
coder list -o json

Sees:
No workspaces found! Create one: coder create <name>

(This is printed to stderr)

This would match the API function and is a valid json.

@matifali matifali added cli Area: CLI customer-reported Bugs reported by enterprise customers. Only humans may set this. labels Jan 29, 2025
@f0ssel f0ssel assigned f0ssel and unassigned f0ssel Feb 10, 2025
@evgeniy-scherbina evgeniy-scherbina self-assigned this Feb 11, 2025
evgeniy-scherbina added a commit that referenced this issue Feb 13, 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Area: CLI customer-reported Bugs reported by enterprise customers. Only humans may set this.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants