Skip to content

Commit

Permalink
Minor name changes and hide experimental flag
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-debricked committed Nov 11, 2024
1 parent a4b0e8d commit efbbc8d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions internal/cmd/scan/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const (
SBOMOutputFlag = "sbom-output"
TagCommitAsReleaseFlag = "tag-commit-as-release"
TagCommitAsReleaseEnv = "TAG_COMMIT_AS_RELEASE"
ExperimentalFlag = "experimental-value"
ExperimentalFlag = "experimental"
)

var scanCmdError error
Expand Down Expand Up @@ -147,7 +147,7 @@ $ debricked scan . --include '**/node_modules/**'`)
experimentalFlagDoc := strings.Join(
[]string{
"This flag allows inclusion of repository matches",
"\nExample:\n$ debricked scan . --experimental-flag=false",
"\nExample:\n$ debricked scan . --experimental=false",
}, "\n")
cmd.Flags().BoolVar(&experimental, ExperimentalFlag, false, experimentalFlagDoc)
verboseDoc := strings.Join(
Expand Down Expand Up @@ -195,6 +195,12 @@ Leaving the field empty results in no SBOM generation.`,
viper.MustBindEnv(SBOMOutputFlag)
viper.MustBindEnv(TagCommitAsReleaseFlag)

// Hide experimental flag
err := cmd.Flags().MarkHidden(ExperimentalFlag)
if err != nil { // This should not be reachable
fmt.Println("Trying to hide non-existing flag")
}

return cmd
}

Expand Down

0 comments on commit efbbc8d

Please sign in to comment.