You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when I run rpminspect -D it prints the current configuration, but it also adds a header and footer (that one is maybe not intentional):
$ rpminspect -D -c /usr/share/rpminspect/redhat.yaml
Program Configuration
==========
---
common:
workdir: /var/tmp/rpminspect
<snip>
==========
rpminspect: *** Invalid before and after build specification.
rpminspect: *** See `rpminspect --help` for more information.
Everything's printed on stderr. This is OK for humans, but not for machines where I'd expect a valid YAML that I can parse.
I think the structure could stay the same, but the actual configuration could go to stdout instead of stderr. That way people could get the YAML and easily filter out the rest.
The text was updated successfully, but these errors were encountered:
This is reasonable. The original intent of the dump config function was to report what the actual configuration settings are for that invocation of the program. I will move it to stdout and make it parseable YAML and make sure it does error out.
Modify the dump_cfg() function to just write YAML to stdout. Remove
the leading header and replace it with a comment. Remove the 4
character indent on every line as well.
Also modify the handling of the -D option. If you specify -D with no
build identifiers, rpminspect will dump the configuration and exit 0.
This also works if you want to pass it a configuration file to use but
just want to see what the final runtime configuration looks like.
You can use "rpminspect -D > config.yaml" to campture the runtime
configuration to a file.
Signed-off-by: David Cantrell <dcantrell@redhat.com>
Currently when I run
rpminspect -D
it prints the current configuration, but it also adds a header and footer (that one is maybe not intentional):Everything's printed on stderr. This is OK for humans, but not for machines where I'd expect a valid YAML that I can parse.
I think the structure could stay the same, but the actual configuration could go to stdout instead of stderr. That way people could get the YAML and easily filter out the rest.
The text was updated successfully, but these errors were encountered: