1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

fix(nix): better errors if nix-prefetch-url fails

This commit is contained in:
Carlos Alexandro Becker 2023-05-29 16:37:07 +00:00
parent 75c47d1da8
commit a3bc051933
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -468,5 +468,9 @@ func (p publishShaPrefetcher) Available() bool {
func (p publishShaPrefetcher) Prefetch(url string) (string, error) {
out, err := exec.Command(p.bin, url).Output()
return strings.TrimSpace(string(out)), err
outStr := strings.TrimSpace(string(out))
if err != nil {
return "", fmt.Errorf("could not prefetch url: %s: %w: %s", url, err, outStr)
}
return outStr, nil
}