forked from rosa/hakurei
internal/pkg: report errors exiting cure
This makes ongoing errors more obvious when multiple failures occur. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -1923,6 +1923,9 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
|
|||||||
}
|
}
|
||||||
c.exitCure(a, curesExempt)
|
c.exitCure(a, curesExempt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if c.msg.IsVerbose() {
|
||||||
|
c.msg.Verbosef("cure file %s: %v", reportName(f, id), err)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1966,6 +1969,9 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
|
|||||||
err = ca.Cure(&t)
|
err = ca.Cure(&t)
|
||||||
c.exitCure(a, curesExempt)
|
c.exitCure(a, curesExempt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if c.msg.IsVerbose() {
|
||||||
|
c.msg.Verbosef("cure trivial %s: %v", reportName(ca, id), err)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -2053,6 +2059,9 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
|
|||||||
}
|
}
|
||||||
c.exitCure(a, curesExempt)
|
c.exitCure(a, curesExempt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if c.msg.IsVerbose() {
|
||||||
|
c.msg.Verbosef("cure %s: %v", reportName(ca, id), err)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -2101,6 +2110,9 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
|
|||||||
Got: gotChecksum,
|
Got: gotChecksum,
|
||||||
Want: checksum.Value(),
|
Want: checksum.Value(),
|
||||||
}
|
}
|
||||||
|
if c.msg.IsVerbose() {
|
||||||
|
c.msg.Verbosef("validate %s: %v", reportName(a, id), err)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user