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:
parent
75c47d1da8
commit
a3bc051933
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user