Skip to content

fix: account-ids-by-name fails on first run with empty array unbound variable error on macOS (bash 3.2) #55

Description

@jrpbc

Summary

When initially executing make infra-set-up-account ACCOUNT_NAME=<ACCOUNT_NAME> using bash (3.2), you would encounter the error below. This is a failure executing script account-ids-by-name when no *.tfbackend file exist yet in infra/account. Executing this in bash version 3.2 - trying to expand empty array ${key_value_pairs[*] is treated as an unbound variable, causing the crash. A possible fix is to change line 20 on bin/account-ids-by-name to safely handle an empty array.

Image

Reproducibility

I tried multiple times and saw the bug every time

How to reproduce the bug

No response

Browser

None

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions