From 3262764580ca803cf5ea58c7df57a35e8f8789f1 Mon Sep 17 00:00:00 2001 From: shyam Date: Tue, 24 Jan 2017 11:10:57 +0530 Subject: [PATCH] Fix linking in windows bash environment In windows the link command simply creates a copy of the directory and hence the removal of the directory fails without the `-r` flag --- src/main/bash/sdkman-path-helpers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/bash/sdkman-path-helpers.sh b/src/main/bash/sdkman-path-helpers.sh index 2e9544b43..b347853aa 100644 --- a/src/main/bash/sdkman-path-helpers.sh +++ b/src/main/bash/sdkman-path-helpers.sh @@ -82,7 +82,7 @@ function __sdkman_link_candidate_version { # Change the 'current' symlink for the candidate, hence affecting all shells. if [[ -h "${SDKMAN_CANDIDATES_DIR}/${candidate}/current" || -d "${SDKMAN_CANDIDATES_DIR}/${candidate}/current" ]]; then - rm -f "${SDKMAN_CANDIDATES_DIR}/${candidate}/current" + rm -fr "${SDKMAN_CANDIDATES_DIR}/${candidate}/current" fi ln -s "${SDKMAN_CANDIDATES_DIR}/${candidate}/${version}" "${SDKMAN_CANDIDATES_DIR}/${candidate}/current" }