tokuhirom / plenv

Perl binary manager
Other
516 stars 71 forks source link

copy-from-rbenv now checks that rbenv dirs exist and aren't empty #161

Open ravenhall opened 4 years ago

ravenhall commented 4 years ago

While looking at open issues, I happened to run 'make' on my (working, up to date) plenv installation. The script author/copy-from-rbenv.sh trashed my plenv install. This patch checks that ~/.rbenv, ~/.rbenv/completions, and ~/.rbenv/libexec exist and are not empty before whacking the corresponding plenv directories.

Git status revealed the damage: deleted: completions/plenv.bash deleted: completions/plenv.fish deleted: completions/plenv.zsh deleted: libexec/plenv deleted: libexec/plenv---version deleted: libexec/plenv-commands deleted: libexec/plenv-completions deleted: libexec/plenv-exec deleted: libexec/plenv-global deleted: libexec/plenv-help deleted: libexec/plenv-hooks deleted: libexec/plenv-init deleted: libexec/plenv-local deleted: libexec/plenv-prefix deleted: libexec/plenv-rehash deleted: libexec/plenv-root deleted: libexec/plenv-sh-rehash deleted: libexec/plenv-sh-shell deleted: libexec/plenv-shims deleted: libexec/plenv-version deleted: libexec/plenv-version-file deleted: libexec/plenv-version-file-read deleted: libexec/plenv-version-file-write deleted: libexec/plenv-version-name deleted: libexec/plenv-version-origin deleted: libexec/plenv-versions deleted: libexec/plenv-whence deleted: libexec/plenv-which

ispyhumanfly commented 4 years ago

This is good to go can we get this merged in @tokuhirom ?