1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 18:15:42 +01:00

Improve uploader exit code

* Fix returning the error if https upload has failed.
This commit is contained in:
Bernhard Reiter 2022-05-10 17:58:39 +02:00
parent 1a93aba71b
commit 9da0589236
No known key found for this signature in database
GPG key ID: 2B7BA3BF9BC3A554

View file

@ -290,7 +290,7 @@ func (p *processor) process(filename string) error {
var uploadErr error var uploadErr error
if resp.StatusCode != http.StatusOK { 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) fmt.Printf("HTTPS %s\n", uploadErr)
} }