mirror of https://github.com/kubernetes/kops.git
Merge pull request #7472 from justinsb/ignore_empty_hashfiles
Ignore empty hashfiles
This commit is contained in:
commit
8843a55073
|
@ -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])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue