From 9f92e81361a1d4b883e81c42e00e588e85db9a11 Mon Sep 17 00:00:00 2001 From: Huang Huang Date: Tue, 15 Feb 2022 01:05:48 +0800 Subject: [PATCH] Update docs about the --outputfile flag (#1094) --- cmd/root.go | 2 +- docs/flags-and-commands.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index ebfaa67..7d2e65a 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -172,7 +172,7 @@ func init() { RootCmd.PersistentFlags().BoolVar(&filterOpts.Unscored, "unscored", true, "Run the unscored CIS checks") RootCmd.PersistentFlags().StringVar(&skipIds, "skip", "", "List of comma separated values of checks to be skipped") RootCmd.PersistentFlags().BoolVar(&includeTestOutput, "include-test-output", false, "Prints the actual result when test fails") - RootCmd.PersistentFlags().StringVar(&outputFile, "outputfile", "", "Writes the JSON results to output file") + RootCmd.PersistentFlags().StringVar(&outputFile, "outputfile", "", "Writes the results to output file when run with --json or --junit") RootCmd.PersistentFlags().StringVarP( &filterOpts.CheckList, diff --git a/docs/flags-and-commands.md b/docs/flags-and-commands.md index 27a2544..d00d9ab 100644 --- a/docs/flags-and-commands.md +++ b/docs/flags-and-commands.md @@ -23,7 +23,7 @@ Flag | Description --noremediations | Disable printing of remediations section to stdout. --noresults | Disable printing of results section to stdout. --nototals | Disable calculating and printing of totals for failed, passed, ... checks across all sections ---outputfile | Writes the JSON results to output file +--outputfile | Writes the results to output file when run with --json or --junit --pgsql | Save the results to PostgreSQL --scored | Run the scored CIS checks (default true) --skip string | List of comma separated values of checks to be skipped