From c2208bb0098a419cb4cbb30fdd71e8d17e77ef84 Mon Sep 17 00:00:00 2001 From: iseki Date: Wed, 23 Oct 2024 16:31:03 +0800 Subject: [PATCH] fix: fill command flags usage --- cmd/murphy/internal/scan/cmd.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/murphy/internal/scan/cmd.go b/cmd/murphy/internal/scan/cmd.go index f2d248e..7afc475 100644 --- a/cmd/murphy/internal/scan/cmd.go +++ b/cmd/murphy/internal/scan/cmd.go @@ -68,8 +68,8 @@ func DfCmd() *cobra.Command { c.Flags().StringVar(&mavenSettingsPath, "maven-settings", "", "specify the path of maven settings") c.Flags().BoolVar(&onlyTaskId, "only-task-id", false, "print task id after task created, the scan result will not be printed") c.Flags().StringArrayVar(&projectTagNames, "project-tag", make([]string, 0), "specify the tag of the project") - c.Flags().StringVar(&sbomOutputConfig, "sbom-output", "", "") - c.Flags().Var(&sbomOutputType, "sbom-format", "") + c.Flags().StringVar(&sbomOutputConfig, "sbom-output", "-", "Specify the SBOM output file path, use \"-\" to output to stdout") + c.Flags().Var(&sbomOutputType, "sbom-format", "(Required) Specify the SBOM format, currently supports: murphysec1.1+json") return &c } @@ -82,8 +82,8 @@ func EnvCmd() *cobra.Command { c.Flags().StringVar(&projectNameCli, "project-name", "", "specify project name") c.Flags().BoolVar(&onlyTaskId, "only-task-id", false, "print task id after task created, the scan result will not be printed") c.Flags().StringArrayVar(&projectTagNames, "project-tag", make([]string, 0), "specify the tag of the project") - c.Flags().StringVar(&sbomOutputConfig, "sbom-output", "-", "") - c.Flags().Var(&sbomOutputType, "sbom-format", "") + c.Flags().StringVar(&sbomOutputConfig, "sbom-output", "-", "Specify the SBOM output file path, use \"-\" to output to stdout") + c.Flags().Var(&sbomOutputType, "sbom-format", "(Required) Specify the SBOM format, currently supports: murphysec1.1+json") return &c }