fix(sarif): fix the warning message (#1647)

This commit is contained in:
afdesk
2022-01-31 14:11:27 +06:00
committed by GitHub
parent 8d5882be03
commit 52fd3c2e0a

View File

@@ -120,7 +120,7 @@ func Write(report Report, option Option) error {
case "template":
// We keep `sarif.tpl` template working for backward compatibility for a while.
if strings.HasPrefix(option.OutputTemplate, "@") && filepath.Base(option.OutputTemplate) == "sarif.tpl" {
log.Logger.Warn("Using `--template sarif.tpl` is deprecated. Please migrate to `--report sarif`. See https://github.com/aquasecurity/trivy/discussions/1571")
log.Logger.Warn("Using `--template sarif.tpl` is deprecated. Please migrate to `--format sarif`. See https://github.com/aquasecurity/trivy/discussions/1571")
writer = SarifWriter{Output: option.Output, Version: option.AppVersion}
break
}