Open hickst opened 5 years ago
What if it added suffixes or prefixes to local?
@andrebrait That's a nice idea. Since all versions seem to begin with a number, a suffix might work best. Perhaps the suffix (default -local
?) could even be a configuration parameter somewhere (~/.sdkman/config
?).
I also like the idea of a suffix, but what to do about the 15 character limit?
I've got to admit that I don't really see the usefulness of making such a suffix configurable.
Oh darn....sorry: I didn't realize there was a 15 character limit (large version numbers could use up a lot of that (e.g., 11.10.101
). Configurable is not that important and would only be useful if the character limit was larger: one might then choose a more descriptive suffix (e.g. -local
or -myhostname
).
Also, don't know if you all realise but the list view already has an
indicator for what is a local version. If you do an sdk ls java
, you will
see that local versions are marked as +
. See the symbols at the bottom.
Right, but I interpreted André's suggestion to mean that instead of "rejecting reserved remote version names when performing a local installation", the program could automatically add a suffix to the name (to distinguish it as a local version). Given the 15 character limit on names, however, a suffix doesn't seem very practical.
I suggest we do the simplest thing possible for now, that is show an error message and return a non-zero error code. wdyt?
Next steps we would need to write a spec for it. Would you like to help updating the specification @hickst?
Please tick one:
When creating a
local
version (i.e. adding/linking an existing local software installation) you must specify a unique version name for the local version. If you specify a version name which is already insdkman's
list of available candidates,sdkman
does not link to the local installation but downloads and installs a new copy of the software.It would be desirable if
sdkman
checked for and rejected local version names which clash with the names of available candidates.