mirror of
https://github.com/go-task/task.git
synced 2025-11-27 22:38:20 +02:00
@@ -122,7 +122,7 @@ func (c *CompilerV1) HandleDynamicVar(v taskfile.Var) (string, error) {
|
||||
Stderr: c.Logger.Stderr,
|
||||
}
|
||||
if err := execext.RunCommand(opts); err != nil {
|
||||
return "", &dynamicVarError{cause: err, cmd: opts.Command}
|
||||
return "", fmt.Errorf(`task: Command "%s" in taskvars file failed: %s`, opts.Command, err)
|
||||
}
|
||||
|
||||
// Trim a single trailing newline from the result to make most command
|
||||
@@ -134,12 +134,3 @@ func (c *CompilerV1) HandleDynamicVar(v taskfile.Var) (string, error) {
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
type dynamicVarError struct {
|
||||
cause error
|
||||
cmd string
|
||||
}
|
||||
|
||||
func (err *dynamicVarError) Error() string {
|
||||
return fmt.Sprintf(`task: Command "%s" in taskvars file failed: %s`, err.cmd, err.cause)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user