Skip to content

Commit

Permalink
Alt. solution: Avoid launching sed process (Fixes rvm#4618)
Browse files Browse the repository at this point in the history
  • Loading branch information
trinitronx committed Jun 21, 2019
1 parent 7d08c95 commit bda5875
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/functions/utility
Expand Up @@ -60,7 +60,8 @@ __rvm_remove_from_path()
if
[[ "$PATH" == *"//"* || "$PATH" == *"/:"* ]]
then
PATH="$(\sed -E -e 's#/+#/#g' -e 's#/:#:#' <<<$PATH)"
while [[ "$PATH" == *"//"* ]] ; do PATH="${PATH/\/\///}" ; done
while [[ "$PATH" == *"/:"* ]] ; do PATH="${PATH/\/:/:}" ; done
fi

if
Expand Down

0 comments on commit bda5875

Please sign in to comment.