After reporting the original problem with brewhere and getting closed without resolution I guess something could be done at least on this module's side.
The problem is, if running puppet apply with sudo and from a private folder, when Homebrew tries to install the packages as the Homebrew unprivileged user, it fails.
When it fails this way, the puppet module does not catch this particular permission error and continues execution, in the end leading to errors like Error: Could not find package: <name>.
I think It should be useful to preventively report an error in the lines:
raise Puppet::ExecutionFailure, "Homebrew user has no privileges on the current folder #{pwd}"
After reporting the original problem with
brew
here and getting closed without resolution I guess something could be done at least on this module's side.The problem is, if running puppet apply with sudo and from a private folder, when Homebrew tries to install the packages as the Homebrew unprivileged user, it fails. When it fails this way, the puppet module does not catch this particular permission error and continues execution, in the end leading to errors like
Error: Could not find package: <name>
.I think It should be useful to preventively report an error in the lines: