From 2175b22f2abe40ccfd4083f7430d9a99293596d0 Mon Sep 17 00:00:00 2001 From: Darko Luketic Date: Mon, 8 Jan 2024 16:45:09 +0100 Subject: [PATCH] more verbose errors --- runner/runner.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runner/runner.go b/runner/runner.go index 3008ac2..09e2ac9 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -41,14 +41,14 @@ func (r *Runner) Run() error { if v != fv { l, e := goBuildBinary(m.RootPath) if e != nil { - return e + return fmt.Errorf("error in goBuildBinary: %s", e) } _, e = r.client.Logentry. Create(). SetContent(l). Save(context.Background()) if e != nil { - return e + return fmt.Errorf("error creating log entry: %s", e) } if m.MoveToTarget { if fl, e := copyFile( @@ -62,12 +62,12 @@ func (r *Runner) Run() error { SetContent(fl). Save(context.Background()) if e != nil { - return e + return fmt.Errorf("error saving log entry: %s", e) } } } else { if e := chownBinary(m.User, m.Group, fmt.Sprintf("%s/%s", m.RootPath, m.BinaryPath)); e != nil { - return e + return fmt.Errorf("error chowning binary: %s", e) } }