From ed5b5f507d7ee44022e72e287516bafd420acc3b Mon Sep 17 00:00:00 2001 From: Brice Oliver Date: Fri, 6 Feb 2026 16:17:36 -0500 Subject: [PATCH] Quote path parts when munging --- scripts/function/munge_path | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/function/munge_path b/scripts/function/munge_path index 257c6fe3..d2b345d9 100644 --- a/scripts/function/munge_path +++ b/scripts/function/munge_path @@ -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 @@ -63,13 +63,13 @@ __gvm_munge_path() { # echo "matched (rvm): ${_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 ]] @@ -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