Skip to content

Commit

Permalink
(tue-functions) use 'local -a' for arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Dec 8, 2022
1 parent aa1a126 commit a2d72e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions setup/tue-functions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,8 @@ function tue-get
continue
fi

local firstfile files
local firstfile
local -a files
firstfile=true
mapfile -t files < <(find "$TUE_ENV_TARGETS_DIR"/"$target" -type f)

Expand Down Expand Up @@ -1293,8 +1294,9 @@ function _tue-repos-do
# The input can be multiple arguments, but if the input consists of multiple commands
# seperated by ';' or '&&' the input needs to be captured in a string.

local mem_pwd cmd
local mem_pwd
mem_pwd=${PWD}
local -a cmd
cmd=("$@")

{ [ -n "$TUE_DIR" ] && cd "$TUE_DIR"; } || { echo -e "TUE_DIR '$TUE_DIR' does not exist"; return 1; }
Expand Down

0 comments on commit a2d72e7

Please sign in to comment.