Skip to content

Replace deprecated pathutils.rmtree by FileUtils.remove_dir#174

Open
ivorbosloper wants to merge 1 commit into
elastic:mainfrom
ivorbosloper:issue_173_fix_deprecated_rmtree
Open

Replace deprecated pathutils.rmtree by FileUtils.remove_dir#174
ivorbosloper wants to merge 1 commit into
elastic:mainfrom
ivorbosloper:issue_173_fix_deprecated_rmtree

Conversation

@ivorbosloper

Copy link
Copy Markdown

Installing elasticsearch-full fails with a MethodDeprecatedError. Replace pathutils.rmtree by fileutils.remove_dir.
Fixes #173

@cla-checker-service

cla-checker-service Bot commented Apr 29, 2025

Copy link
Copy Markdown

💚 CLA has been signed

@nklkarthi nklkarthi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Move config files into etc
(etc/"elasticsearch").install Dir[libexec/"config/*"]
FileUtils.rm_r(libexec/"config")

This worked for me

@ivorbosloper

Copy link
Copy Markdown
Author
# Move config files into etc
(etc/"elasticsearch").install Dir[libexec/"config/*"]
FileUtils.rm_r(libexec/"config")

This worked for me

Thanks @nklkarthi . Not so familiar with Ruby, there seem to be many different ways to delete a directory. The current code with rmtree is deprecated, so we should replace it with some FileUtils code....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MethodDeprecatedError: Calling rmtree is disabled! Use FileUtils#rm_r instead

2 participants