halcyon / asdf-java

A Java plugin for asdf-vm.
MIT License
466 stars 85 forks source link

Check that temporary directory exists before deleting #64

Closed joschi closed 4 years ago

joschi commented 4 years ago

Before deleting the temporary directory ($TEMP_DIR) at the end of the script, make sure that it exists so that we don't accidentally delete the user's home directory.

Fixes #63

halcyon commented 4 years ago

Thank you!

aheritier commented 4 years ago

thanks a lot @joschi and @halcyon

joschi commented 4 years ago

@halcyon @aheritier Thinking a little bit more about the issue, there are still corner cases which would lead to the accidental deletion of a user-owned directory.

I'll address it in another PR.