mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 07:40:48 -08:00
Remove global flags from filesystem command (#772)
* Remove global flags from subcommands If the global flags are added to the subcommand as well as being used globally, their value will be overwritten when the arguments for the subcommand are parsed. This leads to the value passed to the flag at the global position being lost. * Update readme
This commit is contained in:
@@ -386,13 +386,10 @@ func NewFilesystemCommand() *cli.Command {
|
||||
&exitCodeFlag,
|
||||
&skipUpdateFlag,
|
||||
&clearCacheFlag,
|
||||
&quietFlag,
|
||||
&ignoreUnfixedFlag,
|
||||
&debugFlag,
|
||||
&removedPkgsFlag,
|
||||
&vulnTypeFlag,
|
||||
&ignoreFileFlag,
|
||||
&cacheDirFlag,
|
||||
&cacheBackendFlag,
|
||||
&timeoutFlag,
|
||||
&noProgressFlag,
|
||||
@@ -421,13 +418,10 @@ func NewRepositoryCommand() *cli.Command {
|
||||
&exitCodeFlag,
|
||||
&skipUpdateFlag,
|
||||
&clearCacheFlag,
|
||||
&quietFlag,
|
||||
&ignoreUnfixedFlag,
|
||||
&debugFlag,
|
||||
&removedPkgsFlag,
|
||||
&vulnTypeFlag,
|
||||
&ignoreFileFlag,
|
||||
&cacheDirFlag,
|
||||
&cacheBackendFlag,
|
||||
&timeoutFlag,
|
||||
&noProgressFlag,
|
||||
@@ -455,13 +449,10 @@ func NewClientCommand() *cli.Command {
|
||||
&outputFlag,
|
||||
&exitCodeFlag,
|
||||
&clearCacheFlag,
|
||||
&quietFlag,
|
||||
&ignoreUnfixedFlag,
|
||||
&debugFlag,
|
||||
&removedPkgsFlag,
|
||||
&vulnTypeFlag,
|
||||
&ignoreFileFlag,
|
||||
&cacheDirFlag,
|
||||
&timeoutFlag,
|
||||
&ignorePolicy,
|
||||
|
||||
@@ -494,9 +485,6 @@ func NewServerCommand() *cli.Command {
|
||||
&skipUpdateFlag,
|
||||
&downloadDBOnlyFlag,
|
||||
&resetFlag,
|
||||
&quietFlag,
|
||||
&debugFlag,
|
||||
&cacheDirFlag,
|
||||
&cacheBackendFlag,
|
||||
|
||||
// original flags
|
||||
|
||||
Reference in New Issue
Block a user