1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

artifactPrepareVersion: fix error categorization (#2047)

* artifactPrepareVersion: fix error categorization

* Update artifactPrepareVersion.go

* Update artifactPrepareVersion.go

* Update cmd/artifactPrepareVersion.go

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
This commit is contained in:
Oliver Nocon 2020-09-21 14:51:02 +02:00 committed by GitHub
parent fda932aff5
commit 940e9aa498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -340,7 +340,7 @@ func pushChanges(config *artifactPrepareVersionOptions, newVersion string, repos
log.SetErrorCategory(log.ErrorConfiguration) log.SetErrorCategory(log.ErrorConfiguration)
case strings.Contains(errText, "authentication required"): case strings.Contains(errText, "authentication required"):
log.SetErrorCategory(log.ErrorConfiguration) log.SetErrorCategory(log.ErrorConfiguration)
case strings.Contains(errText, "knownhosts: illegal base64"): case strings.Contains(errText, "knownhosts:"):
err = errors.Wrap(err, "known_hosts file seems invalid") err = errors.Wrap(err, "known_hosts file seems invalid")
log.SetErrorCategory(log.ErrorConfiguration) log.SetErrorCategory(log.ErrorConfiguration)
case strings.Contains(errText, "unable to find any valid known_hosts file"): case strings.Contains(errText, "unable to find any valid known_hosts file"):