From 1f2e594eb888d779bbf2ffb3314bf2ce6225ae03 Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Wed, 8 Nov 2023 10:43:29 -0500 Subject: [PATCH] Update log/command.go Co-authored-by: Ayman Bagabas --- log/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log/command.go b/log/command.go index 8216f3c90..da81479b9 100644 --- a/log/command.go +++ b/log/command.go @@ -17,7 +17,7 @@ func (o Options) Run() error { if o.File != "" { f, err := os.OpenFile(o.File, os.O_CREATE|os.O_WRONLY|os.O_APPEND, os.ModePerm) if err != nil { - return errors.New("error opening file") + return fmt.Errorf("error opening file: %w", err) } defer f.Close() //nolint:errcheck