Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions scripts/function/munge_path
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ __gvm_munge_path() {
return 1
fi

IFS=': ' path_in_ary=( $(printf "%s" "${path_in}") ) IFS="$defaultIFS"
IFS=': ' path_in_ary=( "$(printf "%s" "${path_in}")" ) IFS="$defaultIFS"

# extract path elements
local _path
Expand All @@ -57,19 +57,19 @@ __gvm_munge_path() {
if [[ "${_path}" =~ $gvm_regex ]]
then
# echo "matched (gvm): ${_path}"
gvm_ary+=(${_path})
gvm_ary+=("${_path}")
elif [[ "${_path}" =~ $rvm_regex ]]
then
# echo "matched (rvm): ${_path}"
rvm_ary+=(${_path})
rvm_ary+=("${_path}")
else
general_ary+=(${_path})
general_ary+=("${_path}")
fi
done
unset _path

# assemble path array
path_out_ary=( ${rvm_ary[@]} ${gvm_ary[@]} ${general_ary[@]} )
path_out_ary=( "${rvm_ary[@]}" "${gvm_ary[@]}" "${general_ary[@]}" )

# deduplicate path_out_ary if requested, do this just to be helpful :)
if [[ "${path_dedupe_flag}" == true ]]
Expand All @@ -86,7 +86,7 @@ __gvm_munge_path() {
done
unset __element
done
path_out_ary=( ${_dedupe_path_out_ary[@]} )
path_out_ary=( "${_dedupe_path_out_ary[@]}" )
unset _dedupe_path_out_ary
fi

Expand Down