Closed mickroll closed 2 years ago
The unneeded check for zip
will allow the use of SDKMAN! in plain Windows git bash without the need of installing any additional tools.
Currently, I use the following workaround to get SDKMAN! working on Windows:
mkdir -p ~/bin/
cp $(which unzip) ~/bin/zip
SDKMAN! seems to work just fine with this workaround.
After the removal of the unnecessary check for zip
, this workaround would no longer be needed.
However, in jmc_post_unix_tarball.scala.txt
, I could find a reference to using the zip
command. It may be needed for the installation of packages that require repackaging. For the sake of making the life of Windows users easier, I suggest that instead of aborting the installer with an error, this should be turned into a warning, telling users that software that requires repackaging cannot be installed unless zip is installed as well.
The reason we do these checks in the installer is that zip
is a required dependency for repackaging tarballs as zips in the archives
directory as @christianhujer pointed out. This is used in several candidates including Java and JMC. Not having zip
will cause failure, so hence this mandatory condition.
Here's an excerpt from our installation page on our website:
The third solution is for Git users using the Git Bash for Windows environment. In order for this to work, the environment needs to be supplemented with MinGW to add the necessary toolchain to function.
By supplementing your git bash setup with MinGW, you will have all the tools you need to successfully run SDKMAN. That includes the approved InfoZip zip
binary.
So installing sdkman enforces presence of tools, that only a few packages will need.
If this is how it is intended to be, ok.
currently, the installer checks for presence of
zip
: https://github.com/sdkman/sdkman-hooks/blob/afbc9f780c8045d8e252581c4c538de68442367d/app/views/install_stable.scala.txt#L151-L161But the installer does not make use of
zip
. It only usesunzip
, whose presence is checked separately.Please remove the unneeded check for
zip
.