From 4605a7268435171890adcdd077b37bb71d83f1db Mon Sep 17 00:00:00 2001 From: Arkadii Yakovets Date: Wed, 10 Jul 2024 17:24:44 -0700 Subject: [PATCH] Fix lint error Signed-off-by: Arkadii Yakovets --- package/release/asset_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/release/asset_test.go b/package/release/asset_test.go index c6540822f..f6cc7d81f 100644 --- a/package/release/asset_test.go +++ b/package/release/asset_test.go @@ -58,7 +58,10 @@ func getTag() (string, error) { if _, ok := err.(*exec.ExitError); ok { gitDiffStdOut, _ := execCommand("git diff-index -u HEAD").Output() hashGenerator := sha1.New() - io.WriteString(hashGenerator, string(gitDiffStdOut)) + _, err := io.WriteString(hashGenerator, string(gitDiffStdOut)) + if err != nil { + return "", err + } sha1Hex := fmt.Sprintf("%x", hashGenerator.Sum(nil)[0:4]) tag = strings.Join([]string{tag, "-dirty-", sha1Hex}, "") }