From 9da0589236a3b21d9d6fe14a7c5f083920d1f851 Mon Sep 17 00:00:00 2001 From: Bernhard Reiter Date: Tue, 10 May 2022 17:58:39 +0200 Subject: [PATCH] Improve uploader exit code * Fix returning the error if https upload has failed. --- cmd/csaf_uploader/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/csaf_uploader/main.go b/cmd/csaf_uploader/main.go index bca2b21..9599ed7 100644 --- a/cmd/csaf_uploader/main.go +++ b/cmd/csaf_uploader/main.go @@ -290,7 +290,7 @@ func (p *processor) process(filename string) error { var uploadErr error if resp.StatusCode != http.StatusOK { - uploadErr := fmt.Errorf("upload failed: %s", resp.Status) + uploadErr = fmt.Errorf("upload failed: %s", resp.Status) fmt.Printf("HTTPS %s\n", uploadErr) }