Skip to content

release-tools: macOS legs fail with flags[@]: unbound variable (part of #4862) #14370

Closed

Description

@TrapsterDK

Release dry run https://github.com/devhusdk/rules_dx/actions/runs/44876826441 fails on every macOS leg of tools, haskell and hackage:

line 22: flags[@]: unbound variable
##[error]Process completed with exit code 1.

Where

.github/workflows/release-tools.yml: flags=() at :50, :336, :459, then "${flags[@]}" at :63-67, :88, :350-353, :373 and in the hackage step. macOS runners run bash 3.2, where expanding an empty array under set -u is an error. Linux sets the array, so only macOS fails.

Fix

Expand with ${flags[@]+"${flags[@]}"} (or give the macOS case a non-empty value) in every use in release-tools.yml, and check other workflows that run set -u with possibly empty arrays on macOS. Proof: the macOS legs of a release.yml dry run pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions