version: '3'

silent: true
dotenv:
  - 'global.env'
vars:
  VAR: entrypoint-global-vars
env:
  ENV: entrypoint-global-vars

tasks:
  default:
    dotenv:
      - 'task.env'
    cmds:
      - task: called-task
        vars:
          VAR: entrypoint-task-call-vars

  called-task:
    dotenv:
      - 'called-task.env'
    cmds:
      - 'echo "{{.VAR}}"'
      - 'echo "$ENV"'
