returnnil,fmt.Errorf("%s chart not found in repo %s",d.Name,d.Repository)
}
locked[i]=&chartutil.Dependency{
Name:d.Name,
Repository:d.Repository,
Version:d.Version,
}
found:=false
// The version are already sorted and hence the first one to satisfy the constraint is used
for_,ver:=rangevs{
v,err:=semver.NewVersion(ver.Version)
iferr!=nil||len(ver.URLs)==0{
// Not a legit entry.
continue
}
ifconstraint.Check(v){
found=true
locked[i].Version=v.Original()
break
}
}
if!found{
missing=append(missing,d.Name)
}
}
iflen(missing)>0{
returnnil,fmt.Errorf("Can't get a valid version for repositories %s. Try changing the version constraint in requirements.yaml",strings.Join(missing,", "))