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

Output format on failure? #463

Open
mmdevl opened this issue Jul 19, 2023 · 6 comments
Open

Output format on failure? #463

mmdevl opened this issue Jul 19, 2023 · 6 comments
Assignees

Comments

@mmdevl
Copy link

mmdevl commented Jul 19, 2023

It's possible to set an output format on success:

check_ssl_cert --help | grep FORMAT
      --format FORMAT              Format output template on success, for

What about setting also an output format on failure?

@mmdevl mmdevl added the bug label Jul 19, 2023
@matteocorti matteocorti self-assigned this Jul 19, 2023
@matteocorti
Copy link
Owner

Not really a bug but a missing feature. On failure, not all the data is available, and the formatting could be complicated. I'll have a look.

@mmdevl
Copy link
Author

mmdevl commented Jul 19, 2023

You're right (missing feature). You could add these 2 new options:

      --default-failure-format [*]
      --format-failure FORMAT

[*] you already have a kind of default

@matteocorti
Copy link
Owner

I would rather try to keep one option and just display what is available.

matteocorti added a commit that referenced this issue Jul 19, 2023
@matteocorti
Copy link
Owner

I'm still struggling with the failure format, as the content could be very different depending on the error. From one single sentence as for a wrong command line option, to the full output in case of an expired certificate.

I did some refactoring, putting the parsing in a separate function, but I'll leave it here for the moment as I don't really have a bright idea on how to implement it.

The separate command line option would bear the same problems.

@ArminRadmueller
Copy link

Hi Matteo, is there a solution/fix for this issue?

@matteocorti
Copy link
Owner

Not yet, if I find the time I'll try to implement a solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants