Task: How to call parent task from included taskfile in 2.3 version

Created on 17 Jan 2019  路  3Comments  路  Source: go-task/task

Hello,

Since we upgraded to task 2.3 we can't call a parent task from included task
parent file :

version: '2'

 # Shared send sqs message task
 sendMessage:
 cmds:
    - sqs4task -send {{.TASK}} -body {{.MSG_BODY}}
    - command {{if eq .PURGE "yes"}} rm {{.MSG_BODY}} {{end}}

# Sub tasks files
includes:
  format: ./tasks/Format.yml

included file (/Format.yml) :


version:'2'

tasks:
  run:
    cmds:
      - task: sendMessage #parent task
        vars: {MSG_BODY: "{{.MSG_BODY}}"}

bug regression

All 3 comments

Hi @InsaneRaph,

That's indeed a regression. Thanks for reporting, I'll look into fixing it.

@InsaneRaph This is now possible in master by prefixing the task name with : like this:

version: '2'

tasks:
  run:
    cmds:
      task: :send-message

https://github.com/go-task/task/pull/172

Hi @andreynering, thanks a lot for the fix

Was this page helpful?
0 / 5 - 0 ratings

Related issues

testautomation picture testautomation  路  4Comments

shrink picture shrink  路  4Comments

ronlut picture ronlut  路  7Comments

andreynering picture andreynering  路  7Comments

craighurley picture craighurley  路  3Comments