Update Path check to include SDKMAN path

This fixes an issue where the entire path was being added for the current
version if the candidate itself was on the path, but not part of SDKMAN
path
This commit is contained in:
Scott Busche
2016-06-08 08:47:17 -05:00
parent f491c650af
commit fef2ccf619

View File

@@ -51,7 +51,7 @@ function __sdkman_determine_current_version {
local candidate present
candidate="$1"
present=$(__sdkman_path_contains "$candidate")
present=$(__sdkman_path_contains "${SDKMAN_CANDIDATES_DIR}/${candidate}")
if [[ "$present" == 'true' ]]; then
if [[ "$solaris" == true ]]; then
CURRENT=$(echo $PATH | gsed -r "s|${SDKMAN_CANDIDATES_DIR}/${candidate}/([^/]+)/bin|!!\1!!|1" | gsed -r "s|^.*!!(.+)!!.*$|\1|g")