sdkman / sdkman-hooks

An API responsible for serving up pre- and post- hooks
Other
5 stars 23 forks source link

Missing error message when installing on Linux without 'tar' #63

Open martelli opened 7 months ago

martelli commented 7 months ago

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?

marc0der commented 7 months ago

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.

martelli commented 6 months ago

Hey @marc0der ,

Sure, I'll put up a PR!

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

Thanks!

marc0der commented 6 months ago

@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.