trap shouldn't be called without ensuring first that you created TEMP_DIR. That's why I got
TEMP_DIR: unbound variable
Then I would advise to name the variable ASDF_JAVA_TEMP_DIR or something like that to be sure that you don't conflict with an end-user variable called TEMP_DIR
I am not sure how I got firstly this error:
Stupidly I created TEMP_DIR but messed up it and in a way that TEMP_DIR=$HOME
Calling it again ...
The script started to delete my HOME !!!
There are 2 issues in your script from my POV:
https://github.com/halcyon/asdf-java/blob/680e8f72e1143c86ac0cc887fa6fb6e2674d8d19/bin/functions#L7
trap shouldn't be called without ensuring first that you created TEMP_DIR. That's why I got
Then I would advise to name the variable
ASDF_JAVA_TEMP_DIR
or something like that to be sure that you don't conflict with an end-user variable calledTEMP_DIR
Thanks