Skip to content

Extended globbing support #225

@Wicketd

Description

@Wicketd
Task version OS
master macOS Mojave 10.14.5

Using extglob patterns in sources entries makes Task panic. I tried using this to exclude some files from being picked up.


Given the following Taskfile.yml:

version: '2' tasks: foo: cmds: - printf %s Test sources: - ./!(vendor)/**/*.go method: checksum

Task panics after running task foo:

panic: unhandled word part: *syntax.ExtGlob goroutine 1 [running]: github.com/go-task/task/vendor/mvdan.cc/sh/expand.(*Config).wordFields(0xc00019e140, 0xc00015a540, 0x2, 0x2, 0x1, 0x1, 0x203000, 0x0, 0xc0001a0010) /Users/thierry/go/src/github.com/go-task/task/vendor/mvdan.cc/sh/expand/expand.go:546 +0x1292 github.com/go-task/task/vendor/mvdan.cc/sh/expand.Fields(0xc00019e140, 0xc0001a0010, 0x1, 0x1, 0x0, 0x0, 0x1, 0x0, 0xc000194020) /Users/thierry/go/src/github.com/go-task/task/vendor/mvdan.cc/sh/expand/expand.go:323 +0x19a github.com/go-task/task/vendor/mvdan.cc/sh/shell.Fields(0xc0001940a0, 0x11, 0x0, 0x1, 0x13852c8, 0x2, 0xffffffffffffffff, 0xc0001940a0) /Users/thierry/go/src/github.com/go-task/task/vendor/mvdan.cc/sh/shell/expand.go:62 +0x162 github.com/go-task/task/internal/execext.Expand(0xc0001940a0, 0x11, 0x2, 0xc0001940a0, 0x11, 0x10e1548) /Users/thierry/go/src/github.com/go-task/task/internal/execext/exec.go:78 +0x8e github.com/go-task/task/internal/status.glob(0x0, 0x0, 0xc000146010, 0x1, 0x1, 0x21, 0x0, 0x2341460, 0x0, 0x0) /Users/thierry/go/src/github.com/go-task/task/internal/status/glob.go:17 +0xca github.com/go-task/task/internal/status.(*Checksum).IsUpToDate(0xc000144280, 0xc00015c000, 0x13f5520, 0xc000144280) /Users/thierry/go/src/github.com/go-task/task/internal/status/checksum.go:30 +0x10b github.com/go-task/task.(*Executor).isTaskUpToDate(0xc0000b34a0, 0x13f9a20, 0xc000144000, 0xc00015c000, 0x1, 0x0, 0x0) /Users/thierry/go/src/github.com/go-task/task/status.go:40 +0x7f github.com/go-task/task.(*Executor).RunTask(0xc0000b34a0, 0x13f9a20, 0xc000144000, 0x7ffeefbff38d, 0x3, 0x0, 0xc0000a25a0, 0x13f5d20) /Users/thierry/go/src/github.com/go-task/task/task.go:218 +0x60f github.com/go-task/task.(*Executor).Run(0xc0000b34a0, 0x13f9a20, 0xc000144000, 0xc000090ca0, 0x1, 0x1, 0x0, 0x1394802) /Users/thierry/go/src/github.com/go-task/task/task.go:79 +0x139 main.main() /Users/thierry/go/src/github.com/go-task/task/cmd/task/task.go:141 +0xa8d 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions