diff --git a/internal/pipe/nix/nix.go b/internal/pipe/nix/nix.go index f9d256409..6d7fa7ec0 100644 --- a/internal/pipe/nix/nix.go +++ b/internal/pipe/nix/nix.go @@ -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 }