Fix brew tests tap trust config home

`brew tests` overrode `HOME` but not `HOMEBREW_USER_CONFIG_HOME`, which
`bin/brew` had already derived from the real `HOME`. The spec teardown
`rm_rf`s `$HOMEBREW_USER_CONFIG_HOME/trust.json`, so every run deleted the
user's real `~/.homebrew/trust.json`.

Re-point `HOMEBREW_USER_CONFIG_HOME` at the sandboxed `HOME`, matching
`test_bot.rb`, and refuse to clean a `trust.json` that is not sandboxed
under `HOME` so a runner that forgets fails loudly instead of deleting
real user data.
This commit is contained in:
Patrick Linnane
2026-06-08 22:24:22 -07:00
parent afdda4e6b1
commit eb891c0a34
3 changed files with 13 additions and 1 deletions
+1
View File
@@ -14,6 +14,7 @@
/Library/Homebrew/prof
/Library/Homebrew/test/.gem
/Library/Homebrew/test/.cargo/
/Library/Homebrew/test/.homebrew/
/Library/Homebrew/test/.subversion
/Library/Homebrew/test/coverage
/Library/Homebrew/test/junit