Skip to content

Commit ccdb9a6

Browse files
committed
Correct multiline read to array
1 parent 55ea991 commit ccdb9a6

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
@@ -276,10 +276,15 @@ function tue-install-rosdep
276276

277277
# Check if target can be resolved by rosdep
278278
tue-install-debug "rosdep resolve $target"
279-
local rosdep_res rosdep_return_code
279+
local rosdep_res
280+
local rosdep_return_code
280281
rosdep_res=$(rosdep resolve "$target" 2>&1)
281282
rosdep_return_code=$?
282-
read -r -a rosdep_res <<< rosdep_res
283+
284+
local IFS=$'\n'
285+
mapfile -t rosdep_res <<< "$rosdep_res"
286+
unset IFS
287+
283288
if [ $rosdep_return_code -eq 0 ]
284289
then
285290
tue-install-debug "rosdep correctly resolved to: ${rosdep_res[*]}"

0 commit comments

Comments
 (0)