Skip to content

Commit

Permalink
multiple-outputs.sh: Allow var as an output name
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Feb 26, 2023
1 parent 19ade08 commit 71abb2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/build-support/setup-hooks/multiple-outputs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ _assignFirst() {
local varName="$1"
local REMOVE=REMOVE # slightly hacky - we allow REMOVE (i.e. not a variable name)
shift
for var in "$@"; do
if [ -n "${!var-}" ]; then eval "${varName}"="${var}"; return; fi
for _var in "$@"; do
if [ -n "${!_var-}" ]; then eval "${varName}"="${_var}"; return; fi
done
echo
echo "error: _assignFirst: could not find a non-empty variable to assign to ${varName}."
Expand Down

0 comments on commit 71abb2c

Please sign in to comment.