Skip to content
Commit 5c814edb authored by Levi Pearson's avatar Levi Pearson Committed by Benoit Daloze
Browse files

Allow truffleruby to install in an existing empty directory

The check to prevent deleting user files during clean_prefix_path by disallowing
installs into existing directories that weren't earlier truffleruby installs broke
asdf installs, as asdf always creates an empty directory before installing.

This fix adds a second exception to the existing directory case when that directory
is empty. The check is done via testing the length of ls output. The logic was
manually tested against non-existing directories, existing empty directories,
existing non-empty directories in general, and existing non-empty directories
that contained a file named "bin/truffleruby".

I also copied the file over my existing asdf version of ruby-build and made sure that
it successfully installed truffleruby.
parent 2004fd71
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment