Skip to content

Commit d9d4048

Browse files
MatthijsBurghar13pit
authored andcommitted
Correct multiline read to array
1 parent 28961cf commit d9d4048

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

installer/tue-install-impl.bash

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,15 @@ function tue-install-rosdep
181181

182182
# Check if target can be resolved by rosdep
183183
tue-install-debug "rosdep resolve $target"
184-
local rosdep_res rosdep_return_code
184+
local rosdep_res
185+
local rosdep_return_code
185186
rosdep_res=$(rosdep resolve "$target" 2>&1)
186187
rosdep_return_code=$?
187-
read -r -a rosdep_res <<< rosdep_res
188+
189+
local IFS=$'\n'
190+
mapfile -t rosdep_res <<< "$rosdep_res"
191+
unset IFS
192+
188193
if [ $rosdep_return_code -eq 0 ]
189194
then
190195
tue-install-debug "rosdep correctly resolved to: ${rosdep_res[*]}"

0 commit comments

Comments
 (0)