Skip to content

Global variables not accepting types? #2299

Closed Answered by vmaerten
tommyalatalo asked this question in Q&A
Discussion options

You must be logged in to vote

I think you have some space or tab issues

This is working well :

# https://taskfile.dev

version: '3'

vars:
    deps:
      - nfs-server
      - csi-controller
      - csi-node
tasks:
  default:
    cmds:
      - echo {{index .deps 2}}

Note that you won't be able to access to index 3 because index start at 0. So there are 3 index: 0,1 and 2

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tommyalatalo
Comment options

@vmaerten
Comment options

Answer selected by vmaerten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants