mirror of
https://github.com/sdkman/sdkman-cli.git
synced 2026-01-09 23:17:45 -05:00
Synced error message with __sdkman_determine_version
This commit is contained in:
committed by
Marco Vermeulen
parent
617da42f37
commit
750bea8bd7
@@ -27,9 +27,14 @@ function __sdk_default() {
|
||||
|
||||
if [ ! -d "${SDKMAN_CANDIDATES_DIR}/${candidate}/${VERSION}" ]; then
|
||||
echo ""
|
||||
__sdkman_echo_red "Stop! Candidate version is not installed. Please run:"
|
||||
__sdkman_echo_red "Stop! ${candidate} ${VERSION} is not available. Possible causes:"
|
||||
__sdkman_echo_red " * ${VERSION} is an invalid version"
|
||||
__sdkman_echo_red " * ${candidate} binaries are incompatible with ${SDKMAN_PLATFORM}"
|
||||
__sdkman_echo_red " * ${candidate} has not been released yet"
|
||||
echo ""
|
||||
__sdkman_echo_red "$ sdk install ${candidate} ${VERSION}"
|
||||
__sdkman_echo_yellow "Tip: see all available versions for your platform:"
|
||||
echo ""
|
||||
__sdkman_echo_yellow " $ sdk list ${candidate}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -27,9 +27,14 @@ function __sdk_home() {
|
||||
|
||||
if [[ ! -d "${SDKMAN_CANDIDATES_DIR}/${candidate}/${version}" ]]; then
|
||||
echo ""
|
||||
__sdkman_echo_red "Stop! Candidate version is not installed. Please run:"
|
||||
__sdkman_echo_red "Stop! ${candidate} ${version} is not available. Possible causes:"
|
||||
__sdkman_echo_red " * ${version} is an invalid version"
|
||||
__sdkman_echo_red " * ${candidate} binaries are incompatible with ${SDKMAN_PLATFORM}"
|
||||
__sdkman_echo_red " * ${candidate} has not been released yet"
|
||||
echo ""
|
||||
__sdkman_echo_red "$ sdk install ${candidate} ${version}"
|
||||
__sdkman_echo_yellow "Tip: see all available versions for your platform:"
|
||||
echo ""
|
||||
__sdkman_echo_yellow " $ sdk list ${candidate}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -26,9 +26,14 @@ function __sdk_use() {
|
||||
|
||||
if [[ ! -d "${SDKMAN_CANDIDATES_DIR}/${candidate}/${version}" ]]; then
|
||||
echo ""
|
||||
__sdkman_echo_red "Stop! Candidate version is not installed. Please run:"
|
||||
__sdkman_echo_red "Stop! ${candidate} ${version} is not available. Possible causes:"
|
||||
__sdkman_echo_red " * ${version} is an invalid version"
|
||||
__sdkman_echo_red " * ${candidate} binaries are incompatible with ${SDKMAN_PLATFORM}"
|
||||
__sdkman_echo_red " * ${candidate} has not been released yet"
|
||||
echo ""
|
||||
__sdkman_echo_red "$ sdk install ${candidate} ${version}"
|
||||
__sdkman_echo_yellow "Tip: see all available versions for your platform:"
|
||||
echo ""
|
||||
__sdkman_echo_yellow " $ sdk list ${candidate}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -8,9 +8,12 @@ Feature: Default Version
|
||||
Given the candidate "groovy" version "2.0.5" is a valid candidate version
|
||||
And the system is bootstrapped
|
||||
When I enter "sdk default groovy 2.0.5"
|
||||
Then I see "Stop! Candidate version is not installed. Please run:"
|
||||
And I see ""
|
||||
And I see "$ sdk install groovy 2.0.5"
|
||||
Then I see "Stop! groovy 2.0.5 is not available. Possible causes:"
|
||||
And I see "* 2.0.5 is an invalid version"
|
||||
And I see "* groovy binaries are incompatible with LinuxX64"
|
||||
And I see "* groovy has not been released yet"
|
||||
And I see "Tip: see all available versions for your platform:"
|
||||
And I see "$ sdk list groovy"
|
||||
|
||||
Scenario: Default a candidate version that is installed and not default
|
||||
Given the candidate "groovy" version "2.0.5" is a valid candidate version
|
||||
|
||||
@@ -26,9 +26,12 @@ anything else unless it is an actual error.
|
||||
Given the candidate "grails" version "1.3.9" is available for download
|
||||
And the system is bootstrapped
|
||||
When I enter "sdk home grails 1.3.9"
|
||||
Then I see "Stop! Candidate version is not installed. Please run:"
|
||||
And I see ""
|
||||
And I see "$ sdk install grails 1.3.9"
|
||||
Then I see "Stop! grails 1.3.9 is not available. Possible causes:"
|
||||
And I see "* 1.3.9 is an invalid version"
|
||||
And I see "* grails binaries are incompatible with LinuxX64"
|
||||
And I see "* grails has not been released yet"
|
||||
And I see "Tip: see all available versions for your platform:"
|
||||
And I see "$ sdk list grails"
|
||||
And the exit code is 1
|
||||
|
||||
Scenario: Home for a candidate version that does not exist
|
||||
|
||||
@@ -23,9 +23,12 @@ Feature: Use Version
|
||||
Given the candidate "groovy" version "1.9.9" is not available for download
|
||||
And the system is bootstrapped
|
||||
When I enter "sdk use groovy 1.9.9"
|
||||
Then I see "Stop! Candidate version is not installed. Please run:"
|
||||
And I see ""
|
||||
And I see "$ sdk install groovy 1.9.9"
|
||||
Then I see "Stop! groovy 1.9.9 is not available. Possible causes:"
|
||||
And I see "* 1.9.9 is an invalid version"
|
||||
And I see "* groovy binaries are incompatible with LinuxX64"
|
||||
And I see "* groovy has not been released yet"
|
||||
And I see "Tip: see all available versions for your platform:"
|
||||
And I see "$ sdk list groovy"
|
||||
|
||||
Scenario: Use a candidate version that only exists locally
|
||||
Given the candidate "grails" version "2.0.0.M1" is not available for download
|
||||
|
||||
Reference in New Issue
Block a user