Skip to content
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

wrap local commands to support different formats #104

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davixcky
Copy link
Contributor

No description provided.

return nil
}

func Error(out io.Writer, err error, outputFormat config.OutputFormat) error {
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this will change the exit status based on the output format, which is odd.

Can we keep the CLI exit status non zero on error? Perhaps using errors.Join when json or yaml or the default switch case, combining the argument error with the error result of the encoding would not change the exit code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-02-14 at 12 08 48 PM

WDYT on this approach?
Screenshot 2024-02-14 at 12 11 48 PM

@scott-cotton
Copy link
Member

@davixcky I added a comment here #71 (comment) to the related issue for discussing more what we want.

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.

2 participants