Fixed the ruby path test in cases where someone already has the ruby bin path on their path variable

pull/1043/head
Nils Winkler 2017-09-15 08:10:17 +02:00
parent 145ec5dfaa
commit f4fa9def14
1 changed files with 7 additions and 1 deletions

View File

@ -15,6 +15,12 @@ load ../../plugins/available/ruby.plugin
skip 'ruby not installed'
fi
last_path_entry=$(echo $PATH | tr ":" "\n" | tail -1);
# Reset the path for this test to ensure that the ruby directory is not part of the path yet.
PATH="/usr/local/bin:/usr/bin:/bin"
# Then load the ruby plugin again to ensure that the ruby path is appended at the end of the path
load ../../plugins/available/ruby.plugin
local last_path_entry=$(echo $PATH | tr ":" "\n" | tail -1)
[[ "${last_path_entry}" == "${HOME}"/.gem/ruby/*/bin ]]
}