Commit Graph

967 Commits

Author SHA1 Message Date
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
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
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
Oliver Weiler
13db4d631d Move handling of lines without newlines to while loop 2020-10-10 09:31:24 +01:00
Oliver Weiler
734f7ad133 Move handling of lines without newline into while-loop 2020-10-10 09:31:24 +01:00
Oliver Weiler
9c6d080813 Fix wrong os.name for Mac OS X 2020-10-10 09:31:24 +01:00
Oliver Weiler
5c9e5365d0 Revert change to UnixUtils 2020-10-10 09:31:24 +01:00
Oliver Weiler
881d44d482 Add sdk env command to allow per-project configuration 2020-10-10 09:31:24 +01:00
Marco Vermeulen
00734a26e9 Remove offending character from home.feature. 2020-10-10 09:31:24 +01:00
Marco Vermeulen
2726f3f1e6 Move home comments out of source into feature file. 2020-10-10 09:31:24 +01:00
Erik Zivkovic
81bd3811a6 Home dir: Fix broken mnemonic test case 2020-10-10 09:31:24 +01:00
Erik Zivkovic
4b7c40ad58 Home dir: use h mnemonic for home instead of help 2020-10-10 09:31:24 +01:00
Erik Zivkovic
d293e2b3dc Home dir: Move documentation comment into home src 2020-10-10 09:31:24 +01:00
Erik Zivkovic
ebe30b3233 Add a command to print the home path of an installed SDK 2020-10-10 09:31:24 +01:00
yujiorama
3e9a9899f5 change sed delimiter to safe character 2020-10-10 09:31:24 +01:00
Konstantinos Kostarellis
2e4eb63b9b Convenience method "sdk flush"
- flush -> flush archives and flush temp
- adds "bin/" to .gitignore
2020-02-08 19:20:56 +01:00
Marco Vermeulen
28f4190406 Remove all cookie remnants of Oracle JDK from codebase. 2019-11-22 17:04:06 +00:00
Marco Vermeulen
e3ac77f413 Remove obsolete version flush code branch. 2019-11-22 15:07:41 +00:00
Marco Vermeulen
960fa918ec Code formatting. 2019-11-22 14:42:01 +00:00
Marco Vermeulen
788a6b0a56 Remove erroneous failing spec. 2019-11-22 14:41:35 +00:00
Marco Vermeulen
3644186f07 Upgrade to latest library versions. 2019-11-22 14:40:42 +00:00
Marco Vermeulen
9c03510d3c Simplification and improvements to use command.
* For version explicit version in use command
* Do not offer to install version on use command
2019-10-27 18:33:20 +00:00
Marco Vermeulen
52a706adcd Improve wording for cache updates. 2019-10-22 08:15:28 +01:00
Marco Vermeulen
2af13c7cfe #717: Use deterministic name for binary download to enable curl continuation. 2019-10-17 16:09:01 +02:00
Marco Vermeulen
776bfb7ee4 Add curl verbose logging when in debug mode. 2019-10-17 15:55:01 +02:00
Marco Vermeulen
1fe19fefae Tighten up return code on candidate installation. 2019-10-17 15:55:01 +02:00
Marco Vermeulen
b63ee15c88 Further tweak help output. 2019-01-22 11:39:24 +00:00
Marco Vermeulen
01da9b43b3 Refine help for local installation. 2019-01-22 10:17:03 +00:00
Tom Hicks
22c172e8de Update help script with local installation path argument. 2019-01-22 10:09:36 +00:00
Marco Vermeulen
1388c4d07d Reorder sdkman-init script. 2018-12-10 17:48:40 +00:00
Kai Weber
45886e93cf Use 'tee' to write status files
Replace the redirect operator >| with tee.
2018-09-14 13:33:31 +01:00
Kai Weber
5c49a42448 Use '>|' to write var/ status files
Setting 'noclobber' in bash or zsh prevents writing to an existing
regular file when using > as redirecting operator. Setting 'noclobber' allows
users of interactive shells to prevent accidential overwriting of
existing files.

bash and zsh allow to use >| as redirection operator so that the
redirection is attempted.

Because the write to the status files is required and not by accident
the >| is used in those cases.
2018-09-14 13:33:31 +01:00
qudongfang
21e1e73174 change 'sdkman_curl_continue_automatically' option to 'sdkman_curl_continue' 2018-08-24 07:38:16 +02:00