aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/pkg.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-12 20:01:49 +0900
committerOphestra <cat@gensokyo.uk>2026-01-12 21:56:00 +0900
commit41a8d03dd2ff1675e9ab5f0c0134e2b4132e28bf (patch)
tree89cdb6dbbc6caac4c4fafa5b414732d0ca9a56f7 /internal/pkg/pkg.go
parent610572d0e6a6edfe3c2ffd1bfcca1396cad6818f (diff)
internal/pkg: cure completion verbose messages
This reports cure completions to the user. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/pkg.go')
-rw-r--r--internal/pkg/pkg.go21
1 files changed, 19 insertions, 2 deletions
diff --git a/internal/pkg/pkg.go b/internal/pkg/pkg.go
index c1a3f97e..a79f66a1 100644
--- a/internal/pkg/pkg.go
+++ b/internal/pkg/pkg.go
@@ -741,7 +741,13 @@ func (c *Cache) openFile(f File) (r io.ReadCloser, err error) {
return
}
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
if data, err = f.Cure(c.ctx); err != nil {
@@ -935,7 +941,18 @@ func (c *Cache) Cure(a Artifact) (
}
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