Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect path reformatting issue #488

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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