Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Append : to $PATH in remove_dir_from_path

: at the end is necessary in case the last PATH element has
trailing slashes
  • Loading branch information...
commit cf9706aefb1c810af5825d27202b0af5c1526e43 1 parent 52e7ae8
@BanzaiMan BanzaiMan authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  ci_environment/java/templates/ubuntu/jdk_switcher.sh.erb
View
2  ci_environment/java/templates/ubuntu/jdk_switcher.sh.erb
@@ -105,7 +105,7 @@ warn_gcj_user () {
remove_dir_from_path() {
local target=$(echo $1 | sed -e 's:/*$::') # remove all occurrences of / at the end
- PATH=:$(echo $PATH | sed -e 's_/*:_:_g'):
+ PATH=:$(echo $PATH: | sed -e 's_/*:_:_g'):
PATH="${PATH//:$target:/:}"
PATH="${PATH#:}"
PATH="${PATH%:}"
Please sign in to comment.
Something went wrong with that request. Please try again.