mirror of
https://github.com/sdkman/sdkman-cli.git
synced 2026-02-01 02:03:18 -05:00
Minor tweaks to auto install configuration and cukes.
This commit is contained in:
@@ -31,7 +31,7 @@ function __gvmtool_install {
|
||||
if [[ ${VERSION_VALID} == 'valid' ]]; then
|
||||
__gvmtool_install_candidate_version "${CANDIDATE}" "${VERSION}" || return 1
|
||||
|
||||
if [[ -z "${gvm_auto_answer}" ]]; then
|
||||
if [[ "${gvm_auto_answer}" != 'true' ]]; then
|
||||
echo -n "Do you want ${CANDIDATE} ${VERSION} to be set as default? (Y/n): "
|
||||
read USE
|
||||
fi
|
||||
|
||||
@@ -24,7 +24,7 @@ function __gvmtool_use {
|
||||
if [[ "${GVM_ONLINE}" == "true" && ! -d "${GVM_DIR}/${CANDIDATE}/${VERSION}" ]]; then
|
||||
echo ""
|
||||
echo "Stop! ${CANDIDATE} ${VERSION} is not installed."
|
||||
if [[ -z "${gvm_auto_answer}" ]]; then
|
||||
if [[ "${gvm_auto_answer}" != 'true' ]]; then
|
||||
echo -n "Do you want to install it now? (Y/n): "
|
||||
read INSTALL
|
||||
fi
|
||||
|
||||
@@ -32,7 +32,7 @@ Feature: Install Candidate
|
||||
Then the candidate "grails" version "2.1.0" should be the default
|
||||
|
||||
Scenario: Install a candidate and select to use it automatically
|
||||
And I have configured autoinstall="Y"
|
||||
And I have configured "gvm_auto_answer" to "true"
|
||||
When I enter "gvm install grails 2.1.0"
|
||||
Then the candidate "grails" version "2.1.0" is installed
|
||||
And I see "Done installing!"
|
||||
|
||||
@@ -21,7 +21,7 @@ Feature: Use and Default Candidate
|
||||
And the candidate "groovy" version "1.8.8" should be in use
|
||||
|
||||
Scenario: Use a candidate version that is automatically installed
|
||||
And I have configured autoinstall="Y"
|
||||
And I have configured "gvm_auto_answer" to "true"
|
||||
When I enter "gvm use groovy 1.8.8"
|
||||
Then I see "Stop! groovy 1.8.8 is not installed."
|
||||
Then I see "Using groovy version 1.8.8 in this shell."
|
||||
|
||||
@@ -80,9 +80,9 @@ And(~'^the candidate "([^"]*)" version "([^"]*)" is already linked to "([^"]*)"$
|
||||
Files.createSymbolicLink(link, target)
|
||||
}
|
||||
|
||||
And(~'^I have configured autoinstall="([^"]*)"$') { String flag ->
|
||||
And(~'^I have configured "([^"]*)" to "([^"]*)"$') { String configName, String flag ->
|
||||
def configFile = new File("$gvmDir/etc/config")
|
||||
configFile.write "gvm_auto_answer=${flag}"
|
||||
configFile.write "${configName}=${flag}"
|
||||
}
|
||||
|
||||
private prepareCandidateFolder(String baseDir, String candidate, String version) {
|
||||
|
||||
Reference in New Issue
Block a user