Commit Graph

1557 Commits

Author SHA1 Message Date
Oliver Weiler
60ddb0c951 Declare line_without_comments as local and readonly 2020-10-10 09:35:18 +01:00
Oliver Weiler
3c068f4ee3 Declare sub_command as local and readonly 2020-10-10 09:35:18 +01:00
Oliver Weiler
037a5df73f Declare sdkmanrc as a local, readonly variable 2020-10-10 09:35:18 +01:00
Oliver Weiler
fc51c05712 Shorten description 2020-10-10 09:35:18 +01:00
Oliver Weiler
922677fdc9 Revert "Remove unnecessary quoting"
This reverts commit ef1a9c6f84.
2020-10-10 09:35:18 +01:00
Oliver Weiler
d10dfd47ad Remove unnecessary quoting 2020-10-10 09:35:18 +01:00
Oliver Weiler
f1b4a61606 Add explanatory comment 2020-10-10 09:35:18 +01:00
Oliver Weiler
a0abad76c6 Remove unnecessary test 2020-10-10 09:35:18 +01:00
Oliver Weiler
43c2f9c160 Add parametrised test for .sdkmanrc generation 2020-10-10 09:35:18 +01:00
Oliver Weiler
6d219e8088 Revert unwanted change 2020-10-10 09:35:18 +01:00
Oliver Weiler
a6db528b93 Add test for .sdkmanrc generation 2020-10-10 09:35:18 +01:00
Oliver Weiler
fce87d794b Fix broken test 2020-10-10 09:35:18 +01:00
Oliver Weiler
4c53fb8556 Revert function name 2020-10-10 09:35:18 +01:00
Oliver Weiler
aee7d2316e Revert error message 2020-10-10 09:35:18 +01:00
Oliver Weiler
9262e38a60 Extract Java fallback version 2020-10-10 09:35:18 +01:00
Oliver Weiler
26ab750d4d Extract function for sdk env init 2020-10-10 09:35:18 +01:00
Oliver Weiler
a2c7333a7f Improve coding style 2020-10-10 09:35:18 +01:00
Oliver Weiler
3c06f2d2e6 Rename function 2020-10-10 09:35:18 +01:00
Oliver Weiler
a3faeb3b70 Set java version when creating .sdkmanrc 2020-10-10 09:35:18 +01:00
Oliver Weiler
f31071b223 Rename local variable 2020-10-10 09:35:18 +01:00
Oliver Weiler
4f09c2f3f5 Perform normalisation before format check 2020-10-10 09:35:18 +01:00
Oliver Weiler
1f71f926f7 Add rudimentary implementation of sdk env init 2020-10-10 09:35:18 +01:00
Oliver Weiler
3d84b11e0e Do not allow non-whitespace characters after candidate version 2020-10-10 09:35:18 +01:00
Oliver Weiler
892ce1e82b Improve test description 2020-10-10 09:35:18 +01:00
Oliver Weiler
1f04162e70 Remove unused import 2020-10-10 09:35:18 +01:00
Oliver Weiler
43d206b66f Add support for comment lines and blank lines 2020-10-10 09:35:18 +01:00
Ross Goldberg
47188ae980 Fix candidate cache update bug
In __sdk_update, candidates wouldn't be updated if the same number of
candidates were removed & added because detection was solely based on
old vs. new candidate counts.
2020-10-10 09:35:18 +01:00
Jan Larres
708c121f83 Don't fail redirections if noclobber is set
Using the '>|' syntax for shell redirections instead of '>' forces an
overwrite even if the noclobber option is set.
2020-10-10 09:35:18 +01:00
ievgen degtiarenko
761ea99763 746 - upgrade should use auto answer 2020-10-10 09:35:18 +01:00
Marco Vermeulen
248260a73e Improve feedback on env command invocation. 2020-10-10 09:35:18 +01:00
Ross Goldberg
f8dec8792e Fix typo in debug echo in __sdkman_download 2020-10-10 09:35:18 +01:00
Ross Goldberg
054508fc85 Fix misspelled words and phrases
bach        -> back
requirment  -> requirement
can not     -> cannot
unselecting -> deselecting
2020-10-10 09:35:18 +01:00
Marco Vermeulen
c392c4950f Use bin distribution of Gradle 6.3 2020-10-10 09:35:18 +01:00
Marco Vermeulen
5ef2b0d1c6 Format build.gradle with default formatting. 2020-10-10 09:35:18 +01:00
Ross Goldberg
e773a01a4a Upgrade Gradle to 6.3 and upgrade dependencies
Supersedes PR #645
2020-10-10 09:35:18 +01:00
Ross Goldberg
043d2e7c93 Append parentheses after bash function names
IntelliJ auto-formatting inexplicably failed to append parentheses after
function names in certain bash files.  Fixed this.
2020-10-10 09:35:18 +01:00
Ross Goldberg
2dcb4ee301 Reformat .feature files manually/with EditorConfig
Standardize the formatting of .feature files using auto-formatting
specified in .editorconfig, plus some manual reformatting that conforms
to .editorconfig:

 - Use 4-character-wide tabs for indents
 - Only one empty line at end of file
 - Add or remove empty lines
 - Insert initial spaces in comments
 - Remove extra spaces in 2 Cucumber Given clauses
2020-10-10 09:35:15 +01:00
Ross Goldberg
1c9c1c653c Reformat .groovy files manually, with EditorConfig
Standardize the formatting of .groovy files using auto-formatting
specified in .editorconfig, plus some manual reformatting that conforms
to .editorconfig:

 - Fix improper indents
 - Use 4-character-wide tabs for indents
 - Only one empty line at end of file
 - Add or remove empty lines
 - Optimize imports
 - Files generated by HookResponses conform to new formatting
 - Other minor spacing cleanup
2020-10-10 09:33:16 +01:00
Ross Goldberg
961c5de351 Reformat .sh files manually & with EditorConfig
Standardize the formatting of .sh files using auto-formatting specified
in .editorconfig, plus some manual reformatting that conforms to
.editorconfig:

 - Fix improper indents
 - Use 4-character-wide tabs for indents
 - Append () to function names in function declarations
 - Only one empty line at end of file
 - Add or remove empty lines
 - Insert initial spaces in comments
 - Removed unnecessary semicolons
 - Spread conditionals over multiple lines
 - Other minor spacing & format cleanup
2020-10-10 09:33:12 +01:00
Ross Goldberg
9b6d0aa7b8 Reformat build.gradle manually & with EditorConfig
Standardize the formatting of build.gradle using auto-formatting
specified in a new .editorconfig, plus some manual reformatting that
conforms to the new .editorconfig:

 - Use 4-character-wide tabs for indents
 - Optimize imports
 - Only one empty line at end of file
 - Other minor spacing cleanup
2020-10-10 09:31:24 +01:00
Ross Goldberg
adb1aa0c17 fixed testing bug on macOS (& possibly on other platforms) in assertLinkedCandidate in installation_steps.groovy:
assertLinkedCandidate previously compared a calculated link path to a given path, which failed when either path was different but pointed to the same file
assertLinkedCandidate now just correctly ensures paths point to same file
2020-10-10 09:31:24 +01:00
Ross Goldberg
2ae5ed4637 fixed testing bug for platforms other than Linux in 2 steps in stub_steps.groovy:
use lcPlatform where PLATFORM was accidentally used
renamed lowerCaseUname as lcPlatform for consistency
removed unused And
2020-10-10 09:31:24 +01:00
Oliver Weiler
a2e8692c49 Fix broken parameter expansion 2020-10-10 09:31:24 +01:00
Oliver Weiler
197a420730 Replace BASH_REMATCH with parameter expansion 2020-10-10 09:31:24 +01:00
Oliver Weiler
7038e6fecc Inline candidate and version variables 2020-10-10 09:31:24 +01:00
Oliver Weiler
e577f40a60 Add descriptive variable names 2020-10-10 09:31:24 +01:00
Oliver Weiler
e046548f47 Remove unused import 2020-10-10 09:31:24 +01:00
Oliver Weiler
5113bc5c95 Revert error message 2020-10-10 09:31:24 +01:00
Oliver Weiler
20c758e7c4 Improve error message for malformed candidate entry 2020-10-10 09:31:24 +01:00
Oliver Weiler
e5f1d140e0 Add Spock specifications for testing newline handling and candidate entry check 2020-10-10 09:31:24 +01:00