diff --git a/scanrepository/scanrepository.go b/scanrepository/scanrepository.go index 0dee66434..111052f04 100644 --- a/scanrepository/scanrepository.go +++ b/scanrepository/scanrepository.go @@ -291,7 +291,7 @@ func (cfp *ScanRepositoryCmd) fixVulnerablePackages(repository *utils.Repository err = cfp.fixIssuesSeparatePRs(repository, vulnerabilitiesByWdMap) } if err != nil { - return utils.CreateErrorIfPartialResultsDisabled(cfp.scanDetails.AllowPartialResults(), fmt.Sprintf("failed to fix vulnerable dependencies: %s", err.Error()), err) + return utils.CreateErrorIfPartialResultsDisabled(cfp.scanDetails.AllowPartialResults(), "failed to fix vulnerable dependencies", err) } return } diff --git a/utils/utils.go b/utils/utils.go index fc422b595..a62dd3ef9 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -585,7 +585,7 @@ func isUrlAccessible(url string) bool { // This function checks if partial results are allowed by the user. If so instead of returning an error we log the error and continue as if we didn't have an error func CreateErrorIfPartialResultsDisabled(allowPartial bool, messageForLog string, err error) error { if allowPartial { - log.Warn(messageForLog) + log.Warn(fmt.Sprintf("%s: %v", messageForLog, err)) return nil } return err