New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
brew --prefix/--cellar pkg is not a read-only command anymore since homebrew 4.0.0 #14663
Comments
|
Note that in a controlled script environment like is the case for you in opam, |
Do you mean the command should work after two
I’ve tried and with |
Ok, that stops the network request but not the file write because of a Another thing I've noticed is aliases currently aren't handled the same (so |
4.0.2 should solve this: For other read-only commands (e.g. |
brew doctor
outputVerification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputWhat were you trying to do (and why)?
Use
brew --prefix pkg
inside of a sandboxed environment using sandbox-exec (read-only file system)What happened (include all command output)?
$ sandbox-exec -p '(version 1)(allow default)(deny network*)(deny file-write*)(allow network* (remote unix))(allow file-write* (literal "/dev/null") (literal "/dev/dtracehelper"))' brew --cellar openssl
Error: Operation not permitted @ apply2files - /Users/kit_ty_kate/Library/Caches/Homebrew/api/formula.json
What did you expect to happen?
With Homebrew 3.6 for years before,
brew --prefix/--cellar
has never tried to write in a cache file and worked fine inside a read-only sandbox.With Homebrew 4.0 the same command now fails. The only way to make it work is to export
HOMEBREW_NO_INSTALL_FROM_API=1
I’m not sure this is a wanted behaviour for this particular commands so I’m opening an issue to make sure this is an intended change.
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: