internal/pkg: cure completion verbose messages

This reports cure completions to the user.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-12 20:01:49 +09:00
parent 610572d0e6
commit 41a8d03dd2

View File

@@ -741,7 +741,13 @@ func (c *Cache) openFile(f File) (r io.ReadCloser, err error) {
return return
} }
if c.msg.IsVerbose() { if c.msg.IsVerbose() {
c.msg.Verbosef("curing %s to memory...", reportName(f)) rn := reportName(f)
c.msg.Verbosef("curing %s to memory...", rn)
defer func() {
if err == nil {
c.msg.Verbosef("cured %s to memory", rn)
}
}()
} }
var data []byte var data []byte
if data, err = f.Cure(c.ctx); err != nil { if data, err = f.Cure(c.ctx); err != nil {
@@ -935,7 +941,18 @@ func (c *Cache) Cure(a Artifact) (
} }
if c.msg.IsVerbose() { if c.msg.IsVerbose() {
c.msg.Verbosef("curing %s...", reportNameIdent(a, id)) rn := reportNameIdent(a, id)
c.msg.Verbosef("curing %s...", rn)
defer func() {
if err != nil {
return
}
if checksums != "" {
c.msg.Verbosef("cured %s checksum %s", rn, checksums)
} else {
c.msg.Verbosef("cured %s", rn)
}
}()
} }
// cure File outside type switch to skip TContext initialisation // cure File outside type switch to skip TContext initialisation