From e599b5583dd821ed26bdfc01f7f67d4a317b9843 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 16 Feb 2025 17:26:09 +0900 Subject: fmsg: implement suspend in writer This removes the requirement to call fmsg.Exit on every exit path, and enables direct use of the "log" package. However, fmsg.BeforeExit is still encouraged when possible to catch exit on suspended output. Signed-off-by: Ophestra --- internal/system/link.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/system/link.go') diff --git a/internal/system/link.go b/internal/system/link.go index cbde3a1f..7e690c78 100644 --- a/internal/system/link.go +++ b/internal/system/link.go @@ -28,18 +28,18 @@ type Hardlink struct { func (l *Hardlink) Type() Enablement { return l.et } func (l *Hardlink) apply(_ *I) error { - fmsg.VPrintln("linking ", l) + fmsg.Verbose("linking ", l) return fmsg.WrapErrorSuffix(os.Link(l.src, l.dst), fmt.Sprintf("cannot link %q:", l.dst)) } func (l *Hardlink) revert(_ *I, ec *Criteria) error { if ec.hasType(l) { - fmsg.VPrintf("removing hard link %q", l.dst) + fmsg.Verbosef("removing hard link %q", l.dst) return fmsg.WrapErrorSuffix(os.Remove(l.dst), fmt.Sprintf("cannot remove hard link %q:", l.dst)) } else { - fmsg.VPrintf("skipping hard link %q", l.dst) + fmsg.Verbosef("skipping hard link %q", l.dst) return nil } } -- cgit v1.3.1