Skip to content

Commit

Permalink
🧹 add comment why we need no error check for annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock committed Oct 16, 2023
1 parent ad74632 commit 7dc1cff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/cnspec/cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ func getCobraScanConfig(cmd *cobra.Command, runtime *providers.Runtime, cliRes *
log.Fatal().Err(err).Msg("failed to parse inventory")
}

// annotations are user-added, editable labels for assets and are optional, therefore we do not need to check for err
annotations, _ := cmd.Flags().GetStringToString("annotation")
// merge the config and the user-provided annotations with the latter having precedence
optAnnotations := opts.Annotations
Expand Down

0 comments on commit 7dc1cff

Please sign in to comment.