Skip to content

Commit

Permalink
chore: update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Dec 4, 2024
1 parent 05fd0cb commit 71500b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/commands/artifact/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ func Run(ctx context.Context, opts flag.Options, targetKind TargetKind) (err err
// Viper does not have the ability to remove flags.
// So we only save the necessary flags and set these flags after viper.Reset
for _, k := range viper.AllKeys() {
// Skip the `GenerateDefaultConfigFlag` and `ComplianceFlag` flags to avoid errors with default config file.
// Skip the `GenerateDefaultConfigFlag` flags to avoid errors with default config file.
// Users often use "normal" formats instead of compliance. So we'll skip ComplianceFlag
// Also don't keep removed or deprecated flags to avoid confusing users.
if k == flag.GenerateDefaultConfigFlag.ConfigName || k == flag.ComplianceFlag.ConfigName || slices.Contains(hiddenFlags, k) {
continue
Expand Down

0 comments on commit 71500b2

Please sign in to comment.