aboutsummaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/pkg.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/pkg.go b/pkg/pkg.go
index 07d467c7..2d102666 100644
--- a/pkg/pkg.go
+++ b/pkg/pkg.go
@@ -1821,9 +1821,9 @@ func (c *Cache) enterCure(a Artifact, curesExempt bool) error {
}
// exitCure must be called after exiting an [Artifact] implementation.
-func (c *Cache) exitCure(a Artifact, curesExempt, ok bool) {
+func (c *Cache) exitCure(a Artifact, curesExempt bool, err error) {
if c.attr.Notify != nil {
- if ok {
+ if err == nil || IsCollected(err) {
c.attr.Notify <- NExit
} else {
c.attr.Notify <- NFault
@@ -2295,7 +2295,7 @@ func (c *Cache) cure(a Artifact, curesExempt, rebuild bool) (
err = closeErr
}
}
- c.exitCure(a, curesExempt, err == nil)
+ c.exitCure(a, curesExempt, err)
if err != nil {
if c.msg.IsVerbose() {
c.msg.Verbosef(
@@ -2346,7 +2346,7 @@ func (c *Cache) cure(a Artifact, curesExempt, rebuild bool) (
return
}
err = ca.Cure(&t)
- c.exitCure(a, curesExempt, err == nil)
+ c.exitCure(a, curesExempt, err)
if err != nil {
if c.msg.IsVerbose() {
c.msg.Verbosef(
@@ -2518,7 +2518,7 @@ func (c *Cache) cure(a Artifact, curesExempt, rebuild bool) (
return
}
err = ca.Cure(&f)
- c.exitCure(a, curesExempt, err == nil)
+ c.exitCure(a, curesExempt, err)
if !rebuild && err == nil {
err = f.linkSubstitute(ids, substitutes)