From 940e9aa4980f37629e98825ae468f566b6d69aa9 Mon Sep 17 00:00:00 2001 From: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com> Date: Mon, 21 Sep 2020 14:51:02 +0200 Subject: [PATCH] artifactPrepareVersion: fix error categorization (#2047) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * artifactPrepareVersion: fix error categorization * Update artifactPrepareVersion.go * Update artifactPrepareVersion.go * Update cmd/artifactPrepareVersion.go Co-authored-by: Stephan Aßmus Co-authored-by: Stephan Aßmus --- cmd/artifactPrepareVersion.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/artifactPrepareVersion.go b/cmd/artifactPrepareVersion.go index 6a0691ab4..524687299 100644 --- a/cmd/artifactPrepareVersion.go +++ b/cmd/artifactPrepareVersion.go @@ -340,7 +340,7 @@ func pushChanges(config *artifactPrepareVersionOptions, newVersion string, repos log.SetErrorCategory(log.ErrorConfiguration) case strings.Contains(errText, "authentication required"): 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") log.SetErrorCategory(log.ErrorConfiguration) case strings.Contains(errText, "unable to find any valid known_hosts file"):