Consume artifact verify mechanism

Refers to #28
This commit is contained in:
Ettore Di Giacinto
2019-12-29 13:58:49 +01:00
parent eeb6719529
commit 2693ec2f8c

View File

@@ -265,6 +265,11 @@ func (l *LuetInstaller) installPackage(a ArtifactMatch, s *System) error {
artifact, err := a.Repository.Client().DownloadArtifact(a.Artifact)
defer os.Remove(artifact.GetPath())
err = artifact.Verify()
if err != nil {
return errors.Wrap(err, "Artifact integrity check failure")
}
files, err := artifact.FileList()
if err != nil {
return errors.Wrap(err, "Could not open package archive")