Merge pull request #7472 from justinsb/ignore_empty_hashfiles

Ignore empty hashfiles
This commit is contained in:
Kubernetes Prow Robot 2019-08-26 08:08:23 -07:00 committed by GitHub
commit 8843a55073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -314,6 +314,10 @@ func (a *AssetBuilder) findHash(file *FileAsset) (*hashing.Hash, error) {
// Accept a hash string that is `<hash> <filename>`
fields := strings.Fields(hashString)
if len(fields) == 0 {
klog.Infof("hash file was empty %q", hashURL)
continue
}
return hashing.FromString(fields[0])
}
}