Skip to content

Associative array is broken. Regression?  #1108

Closed
@kundeng

Description

@kundeng

Is this regression of #884?

The error is filed with go-task go-task/task#1908 but was asked to report it here.

Using the latest go-task. The code below just prints "0".

version: '3'

tasks:
  test:
    desc: "This taskfile manages Docker stacks."
    cmds:
      - |
        declare -A database_lookup
        database_lookup["management"]=management
        database_lookup["devicetwin"]=devicetwin
        database_lookup["identity"]=identity
        
        for d in "${!database_lookup[@]}"
        do
          echo $d
        done 

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