Task: panic: unhandled word part: *syntax.ProcSubst

Created on 18 Nov 2019  路  4Comments  路  Source: go-task/task

version: '2'

tasks:
  ehrbase:
    cmds:
      - java -jar application/target/application-0.9.0.jar > log &
      - grep -m 1 "Started EhrBase in" <(tail -f log)
      - echo EHRbase started and ready to be used.

results in error

task -t task.yml ehrbase
java -jar application/target/application-0.9.0.jar > log &
grep -m 1 "Started EhrBase" <(tail -f log)
panic: unhandled word part: *syntax.ProcSubst

goroutine 1 [running]:
mvdan.cc/sh/v3/expand.(*Config).wordFields(0xc00018a500, 0xc0001aa880, 0x1, 0x1, 0xc000184080, 0x12, 0x0, 0x0, 0x0)
    /Users/andrey/code/andrey/GOPATH/pkg/mod/mvdan.cc/sh/[email protected]/expand/expand.go:585 +0x128a
mvdan.cc/sh/v3/expand.Fields(0xc00018a500, 0xc00012a580, 0x5, 0x8, 0xc0000e53e8, 0x1014da8, 0x424db00, 0xc0000e53a8, 0x1166a0c)
    /Users/andrey/code/andrey/GOPATH/pkg/mod/mvdan.cc/sh/[email protected]/expand/expand.go:374 +0x15b
mvdan.cc/sh/v3/interp.(*Runner).fields(0xc00015d200, 0xc00012a580, 0x5, 0x8, 0xffffffffffffffff, 0xc0000e5418, 0x10b8758)
    /Users/andrey/code/andrey/GOPATH/pkg/mod/mvdan.cc/sh/[email protected]/interp/interp.go:136 +0x5a
mvdan.cc/sh/v3/interp.(*Runner).cmd(0xc00015d200, 0x14140e0, 0xc00012a000, 0x1412b60, 0xc0001b5500)
    /Users/andrey/code/andrey/GOPATH/pkg/mod/mvdan.cc/sh/[email protected]/interp/interp.go:806 +0x10e8
mvdan.cc/sh/v3/interp.(*Runner).stmtSync(0xc00015d200, 0x14140e0, 0xc00012a000, 0xc00019a800)
    /Users/andrey/code/andrey/GOPATH/pkg/mod/mvdan.cc/sh/[email protected]/interp/interp.go:739 +0x2b6
mvdan.cc/sh/v3/interp.(*Runner).stmt(0xc00015d200, 0x14140e0, 0xc00012a000, 0xc00019a800)
    /Users/andrey/code/andrey/GOPATH/pkg/mod/mvdan.cc/sh/[email protected]/interp/interp.go:720 +0x1ce
mvdan.cc/sh/v3/interp.(*Runner).stmts(0xc00015d200, 0x14140e0, 0xc00012a000, 0xc0001b1020, 0x1, 0x4)
    /Users/andrey/code/andrey/GOPATH/pkg/mod/mvdan.cc/sh/[email protected]/interp/interp.go:1067 +0x56
mvdan.cc/sh/v3/interp.(*Runner).Run(0xc00015d200, 0x14140e0, 0xc00012a000, 0x140f7e0, 0xc00012a540, 0x0, 0xc00013cc00)
    /Users/andrey/code/andrey/GOPATH/pkg/mod/mvdan.cc/sh/[email protected]/interp/interp.go:659 +0x170
github.com/go-task/task/v2/internal/execext.RunCommand(0x14140e0, 0xc00012a000, 0xc0000e5af0, 0x1c, 0x7)
    /Users/andrey/code/andrey/task/internal/execext/exec.go:59 +0x2fd
github.com/go-task/task/v2.(*Executor).runCommand(0xc0000a02c0, 0x14140e0, 0xc00012a000, 0xc000144000, 0x7fff5fbffb29, 0x7, 0x0, 0x2, 0x0, 0x0)
    /Users/andrey/code/andrey/task/task.go:327 +0x3e4
github.com/go-task/task/v2.(*Executor).RunTask(0xc0000a02c0, 0x14140e0, 0xc00012a000, 0x7fff5fbffb29, 0x7, 0x0, 0xc000096600, 0x140fea0)
    /Users/andrey/code/andrey/task/task.go:242 +0x218
github.com/go-task/task/v2.(*Executor).Run(0xc0000a02c0, 0x14140e0, 0xc00012a000, 0xc000090860, 0x1, 0x1, 0x0, 0x13ad2db)
    /Users/andrey/code/andrey/task/task.go:81 +0x139
main.main()
    /Users/andrey/code/andrey/task/cmd/task/task.go:156 +0xb75

Moreover it is strange that the java process is not started at all in above example. The java process starts only if do not try to put it into background or if I add a sleep after the java -jar ... & command.


Task version: 2.7.1
Darwin Kernel Version 15.6.0: Thu Jun 21 20:07:40 PDT 2018; root:xnu-3248.73.11~1/RELEASE_X86_64 x86_64
bug

Most helpful comment

@testautomation This should be fixed on master. Let me know if you still have problems.

All 4 comments

Hi @testautomation,

Thanks for reporting this issue.

I just opened an issue on the shell library about this: https://github.com/mvdan/sh/issues/451.

@testautomation This should be fixed on master. Let me know if you still have problems.

@andreynering Looks good for me. Thank you! When will it be released?

Was this page helpful?
0 / 5 - 0 ratings