mirror of
https://github.com/sdkman/sdkman-cli.git
synced 2026-02-22 01:24:13 -05:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user