sdkman/sdkman-hooks

Missing error message when installing on Linux without 'tar'

martelli opened this issue · 3 comments

Hey,

I've just installed sdkman on a minimal Rocky Linux box that was missing 'tar' (sdkman was the first package installed).

I needed to dig to find that 'tar' was missing, as I would only get:

Download has failed, aborting!
Can not install java @version at this time...

Upon code inspection, I noticed that app/views/java_post_linux_tarball.scala.txt is missing the function __sdkman_check_commands_present, which should have pointed me in the right direction.

Any particular reason for it to be missing or can I submit the PR to include it?

Hi @martelli,

You are right, we should be doing a pre installation check to see if tar is present. The right place to do this is along with all the other pre installation checks in the install hooks. This should be present in both the stable and beta variants of the installation hook.

I'd gladly accept a PR for this if you'd be willing.

Hey @marc0der ,

Sure, I'll put up a PR!

(sorry for the delay, I've been busy with job hunting...)

Thanks!

@martelli Great, well let me know how you get on! Let's start with the beta hook, then once we've confirmed that it works on the beta channel, we can promote to stable.