mirror of
https://github.com/go-task/task.git
synced 2026-08-29 10:08:27 +02:00
chore: bump minimum Go to 1.26 and adopt 1.26 features (#2920)
This commit is contained in:
@@ -413,8 +413,7 @@ func (r *Reader) readNode(ctx context.Context, node Node) (*ast.Taskfile, error)
|
||||
var tf ast.Taskfile
|
||||
if err := yaml.Unmarshal(b, &tf); err != nil {
|
||||
// Decode the taskfile and add the file info the any errors
|
||||
taskfileDecodeErr := &errors.TaskfileDecodeError{}
|
||||
if errors.As(err, &taskfileDecodeErr) {
|
||||
if taskfileDecodeErr, ok := errors.AsType[*errors.TaskfileDecodeError](err); ok {
|
||||
snippet := NewSnippet(b,
|
||||
WithLine(taskfileDecodeErr.Line),
|
||||
WithColumn(taskfileDecodeErr.Column),
|
||||
|
||||
Reference in New Issue
Block a user