diff --git a/pkg/provenance/sign.go b/pkg/provenance/sign.go index 5a7626424..26ae26031 100644 --- a/pkg/provenance/sign.go +++ b/pkg/provenance/sign.go @@ -405,7 +405,7 @@ func DigestFile(filename string) (string, error) { func Digest(in io.Reader) (string, error) { hash := crypto.SHA256.New() if _, err := io.Copy(hash, in); err != nil { - return "", nil + return "", err } return hex.EncodeToString(hash.Sum(nil)), nil }