summaryrefslogtreecommitdiff
path: root/pkg/machine/fedora.go
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-08 09:24:25 +0000
committerGitHub <noreply@github.com>2022-07-08 09:24:25 +0000
commit6087fb2116aaeae995e8423872ffe637e8be128f (patch)
treee8bd00a9b325a51a49de02e868f06eec2deeb529 /pkg/machine/fedora.go
parenta2bcf833c98cb38eb28dc65a8768963d0b7344fc (diff)
parenta46f798831df06c472b288db7b34de8536a7ea5a (diff)
downloadpodman-6087fb2116aaeae995e8423872ffe637e8be128f.tar.gz
podman-6087fb2116aaeae995e8423872ffe637e8be128f.tar.bz2
podman-6087fb2116aaeae995e8423872ffe637e8be128f.zip
Merge pull request #14839 from saschagrunert/errors-pkg
pkg: switch to golang native error wrapping
Diffstat (limited to 'pkg/machine/fedora.go')
-rw-r--r--pkg/machine/fedora.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/machine/fedora.go b/pkg/machine/fedora.go
index 14a173da6..46e450418 100644
--- a/pkg/machine/fedora.go
+++ b/pkg/machine/fedora.go
@@ -4,6 +4,7 @@
package machine
import (
+ "errors"
"fmt"
"io"
"io/ioutil"
@@ -13,7 +14,6 @@ import (
"path/filepath"
"regexp"
- "github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@@ -107,12 +107,12 @@ func getFedoraDownload(releaseStream string) (string, *url.URL, int64, error) {
newLocation := rawURL + file
downloadURL, err := url.Parse(newLocation)
if err != nil {
- return "", nil, -1, errors.Wrapf(err, "invalid URL generated from discovered Fedora file: %s", newLocation)
+ return "", nil, -1, fmt.Errorf("invalid URL generated from discovered Fedora file: %s: %w", newLocation, err)
}
resp, err := http.Head(newLocation)
if err != nil {
- return "", nil, -1, errors.Wrapf(err, "head request failed: %s", newLocation)
+ return "", nil, -1, fmt.Errorf("head request failed: %s: %w", newLocation, err)
}
_ = resp.Body.Close()