mxcl/homebrew — pull request #16629 by dougal (2012-12-17 22:32:53+00:00)
Title: ElasticSearch: Don't clean the plugins directory.

The plugins directory is symlinked to persist plugins across upgrades. On an first-install the cleanup step would attempt to remove this directory, but warn as it is a symlink:

$ brew install -verbose elasticsearch
==> Downloading https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.20.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/elasticsearch-0.20.1.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/elasticsearch-0.20.1.tar.gz
==> Cleaning
rmdir: /usr/local/Cellar/elasticsearch/0.20.1/plugins (empty)
Warning: The cleaning step did not complete successfully
Still, the installation was successful, so we will link it into your prefix
==> Caveats
...

Calling the skip_clean method on the plugins directory prevents cleanup from trying to remove this directory, and this the warning no longer appears.

$ brew install -verbose elasticsearch
==> Downloading https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.20.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/elasticsearch-0.20.1.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/elasticsearch-0.20.1.tar.gz
==> Cleaning
==> Caveats
...