From 824b0c01326fac111fdf96f08183286498a0c9f8 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sat, 10 Jul 2021 19:33:36 -0300 Subject: [PATCH] Improve error message --- internal/compiler/v2/compiler_v2.go | 2 +- internal/compiler/v3/compiler_v3.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/compiler/v2/compiler_v2.go b/internal/compiler/v2/compiler_v2.go index 740b33b1..2b3970bb 100644 --- a/internal/compiler/v2/compiler_v2.go +++ b/internal/compiler/v2/compiler_v2.go @@ -109,7 +109,7 @@ func (c *CompilerV2) HandleDynamicVar(v taskfile.Var, _ string) (string, error) Stderr: c.Logger.Stderr, } if err := execext.RunCommand(context.Background(), opts); err != nil { - return "", fmt.Errorf(`task: Command "%s" in taskvars file failed: %s`, opts.Command, err) + return "", fmt.Errorf(`task: Command "%s" failed: %s`, opts.Command, err) } // Trim a single trailing newline from the result to make most command diff --git a/internal/compiler/v3/compiler_v3.go b/internal/compiler/v3/compiler_v3.go index 22b77b7c..3634d2e7 100644 --- a/internal/compiler/v3/compiler_v3.go +++ b/internal/compiler/v3/compiler_v3.go @@ -136,7 +136,7 @@ func (c *CompilerV3) HandleDynamicVar(v taskfile.Var, dir string) (string, error Stderr: c.Logger.Stderr, } if err := execext.RunCommand(context.Background(), opts); err != nil { - return "", fmt.Errorf(`task: Command "%s" in taskvars file failed: %s`, opts.Command, err) + return "", fmt.Errorf(`task: Command "%s" failed: %s`, opts.Command, err) } // Trim a single trailing newline from the result to make most command