From cc571d30fc7f149c1b8316d0f68a7ea2997d057f Mon Sep 17 00:00:00 2001 From: Joe Horsnell Date: Fri, 30 Apr 2021 14:32:52 +0100 Subject: [PATCH] Make the `env install` command set the shell versions (#906) Fixes #905. --- src/main/bash/sdkman-env.sh | 1 + src/test/resources/features/per_project_configuration.feature | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/bash/sdkman-env.sh b/src/main/bash/sdkman-env.sh index d96b4a1a..8ed48a0f 100644 --- a/src/main/bash/sdkman-env.sh +++ b/src/main/bash/sdkman-env.sh @@ -40,6 +40,7 @@ function __sdkman_setup_env() { fi sdkman_auto_answer="true" USE="n" __sdkman_env_each_candidate "$sdkmanrc" "__sdk_install" + __sdkman_load_env "$sdkmanrc" } function __sdkman_load_env() { diff --git a/src/test/resources/features/per_project_configuration.feature b/src/test/resources/features/per_project_configuration.feature index 60aadd3a..d932fb78 100644 --- a/src/test/resources/features/per_project_configuration.feature +++ b/src/test/resources/features/per_project_configuration.feature @@ -35,6 +35,7 @@ Feature: Per-project configuration When I enter "sdk env install" Then I see "Done installing!" And the candidate "groovy" version "2.4.1" is installed + And the candidate "groovy" version "2.4.1" is in use And the candidate "groovy" version "2.0.5" should be the default Scenario: The env install subcommand is issued without an sdkman project configuration present