442 Commits

Author SHA1 Message Date
Ruoyu Zhong
b45f0ecd2e
test/cmd/update-report: fix test 2025-08-19 14:59:40 +08:00
Mike McQuaid
0d4f3419ac
Merge pull request #20446 from Homebrew/copilot/fix-20427
Fix `brew upgrade` not linking newer versions when upgrade interrupted
2025-08-15 18:34:36 +00:00
copilot-swe-agent[bot]
42d4f3d8b9
Upgrade unlinked/unpinned kegs
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-15 19:18:52 +01:00
copilot-swe-agent[bot]
c3934c8d8b
Fix concurrent download error for duplicate URLs
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-15 17:13:30 +01:00
Patrick Linnane
2605529a90
brew style --fix 2025-08-13 12:23:12 -07:00
Eric Knibbe
6255263b51
output: express environment variables consistently 2025-08-04 09:50:06 -04:00
Bo Anderson
b2ffe7b060
Fix handling of formula install blocks 2025-07-23 21:19:22 +01:00
Rylan Polster
d436381616
Fix tests with concurrent set 2025-07-20 17:13:07 -04:00
Mike McQuaid
5cc6722372
Optionally use DownloadQueue for brew install
Allowing using `HOMEBREW_DOWNLOAD_CONCURRENCY` to use the
`DownloadQueue` for `brew install` by downloading and extracting
bottles in parallel.

This requires some fixes in e.g. `Dependency` and `FormulaInstaller`
to be able to front-load all downloads and handle parallelisation of
bottle pouring.

Behaviour without `HOMEBREW_DOWNLOAD_CONCURRENCY` set should be
unchanged.

Attestations are not handled for now and the UI should be improved
before we roll this out to users.

Post-install upgrades are not yet parallelised.

Co-authored-by: Carlo Cabrera <github@carlo.cab>
2025-07-18 15:00:23 +01:00
Mike McQuaid
a3d6ee1d2a
Refactor DownloadQueue handling
- Use undocumented (for now) `HOMEBREW_DOWNLOAD_CONCURRENCY` instead
  of `--concurrency` flag and avoid passing around `concurrency`
- Create and use `Formula#enqueue_resources_and_patches` helper method
- Rename some method calls to be more obvious
- Use `Downloadable` type to simplify type checks
- General refactoring
2025-07-17 17:49:53 +01:00
Eric Knibbe
c1818fd099
aliases/aliases: fix naming of symlinks 2025-07-11 13:19:58 -04:00
Douglas Eichelberger
f4bcda325a
Exit non-zero when pinning uninstalled formula 2025-07-04 13:28:54 -07:00
Mike McQuaid
b87d2887fe
Merge pull request #20033 from tyuwags/master
Refine ask‐option dependency resolution and strengthen tests
2025-06-26 10:52:46 +00:00
Mike McQuaid
28753ef002
cmd/update-report: display descriptions for new formulae and casks.
This parses Homebrew's API JSON data to display descriptions for new
formulae and casks if available.

While we're here also add tests for ReporterHub.
2025-06-24 16:59:24 +01:00
Thibaut Hérault
27a040cc32
Merge branch 'master' into master 2025-06-17 20:49:18 -04:00
thibhero
fc18956eeb removing longer tests and putting back integration_test.rb 2025-06-17 20:21:32 -04:00
Peter Wu
770335f72e Remove unused --force-auto-update option
Remove the `brew tap --force-auto-update` option and the
`force_auto_update` configuration file option from Homebrew Bundles.

Fixes #19856
2025-06-12 14:16:12 +02:00
thibhero
fb5ddde5ad resolving discussions 2025-06-11 22:36:57 -04:00
Mike McQuaid
dffa42839c
Merge branch 'master' into master 2025-06-11 13:24:46 +01:00
Mike McQuaid
144113318e
Merge pull request #20071 from Homebrew/brew_deps_output_warning
cmd/deps: add warning when not using runtime dependencies.
2025-06-10 15:41:25 +00:00
Mike McQuaid
d2f9677cde
cmd/deps: add warning when not using runtime dependencies.
This should provide clarify as to why the output may differ from a
formula's declared dependencies.
2025-06-10 15:55:39 +01:00
Mike McQuaid
e9f55a8f71
tests: default to API mode enabled.
While we're here, also add `brew tests --no-parallel` which I relied
on during testing.

Pretty much anywhere we rely on a stubbed formula on disk to work: we
need to disable the API.
2025-06-10 15:53:27 +01:00
thibhero
a8638270f2 putting up to date install test 2025-06-08 12:35:10 -04:00
thibhero
628d265d7a updating test for upgrade 2025-06-08 11:31:51 -04:00
Mike McQuaid
e825ceea0a
Merge pull request #20041 from Homebrew/mcp_server
Add `brew mcp-server`: a MCP server for Homebrew.
2025-06-04 07:58:01 +00:00
Mike McQuaid
76c4eb60ee
test/cmd: add more shell tests.
This should help ensure that these don't regress.
2025-06-03 15:24:19 +01:00
Mike McQuaid
f9471f9591
Add brew mcp-server: a MCP server for Homebrew.
Add a new `brew mcp-server` command for a Model Context Protocol (MCP)
server for Homebrew. This integrates with AI/LLM tools like Claude,
Claude Code and Cursor.

It currently supports the calls needed/used by the MCP Inspector and
Cursor (where I've tested it).

It provides as `tools` the subcommands output by `brew help` but should
be fairly straightforward to add more in future.

It is implemented in a slightly strange way (a standalone Ruby command
called from a shell command) as MCP servers need a faster startup time
than a normal Homebrew Ruby command allows and fail if they don't get
it.

There are a few Ruby libraries available but, given how relatively
simplistic the implementation is, it didn't feel worthwhile to use and
vendor them.
2025-06-03 15:22:33 +01:00
thibhero
19134b3005 making tests more robust with bottles to verify the whole hierarchy oh dependencies and dependants is upgraded as expected 2025-05-31 12:54:53 -04:00
Sam Ford
7b2d84337e
cmd/upgrade: fix output regex in test
The "upgrades with asking for user prompts with dependants checks"
test for `cmd/upgrade` has been failing on CI. The regex in the test
doesn't match expected output because the negative lookaheads aren't
working as expected. The intention is to make sure that the names
aren't repeated (i.e., second shouldn't match first, third shouldn't
match first or second) but the negative lookaheads should be
_inside_ the second/third capture group for this to work as intended.

This updated regex should work as expected. I manually tested it
using the output from CI to make sure that it matches when no formula
names are repeated (e.g., `Formulae (3): testball, testball4,
testball5`) and does not match if formula names are repeated (e.g.,
`Formulae (3): testball5, testball4, testball5`).
2025-04-09 12:56:06 -04:00
Mike McQuaid
bdeca530ff
Migrate Homebrew/bundle to Homebrew/brew
Co-authored-by: Bo Anderson <mail@boanderson.me>
2025-03-19 06:47:01 +00:00
botantony
25b9000c77
spec_helper: add :needs_systemd
Signed-off-by: botantony <antonsm21@gmail.com>
2025-03-13 20:29:26 +01:00
botantony
3ef52e4844
services: migrate command to main repo (WIP) 2025-03-13 13:22:01 +00:00
thibhero
6d3ca98207 correcting regex to match in any order and only once 2025-03-07 00:38:02 -05:00
thibhero
692174305d correcting regex to match in any order and only once 2025-03-06 23:54:19 -05:00
thibhero
9874f2bbb9 check for formula in any order 2025-03-06 23:30:22 -05:00
thibhero
909f2afd16 brew style --fix 2025-03-06 23:02:17 -05:00
thibhero
459741f683 include FileUtils for touch 2025-03-06 22:59:58 -05:00
thibhero
e6d02658b2 adding installed up-to-date 2025-03-06 22:03:15 -05:00
thibhero
2edc42e905 erratum testball and not testball1 2025-03-06 21:43:24 -05:00
thibhero
0ebbd118e4 test for reinstall 2025-03-06 21:27:35 -05:00
thibhero
c5b8dd91f1 test for upgrade 2025-03-06 21:27:25 -05:00
thibhero
99fad7797c modifying files with brew style 2025-03-06 21:27:13 -05:00
thibhero
16599b6e05 tests for install_spec.rb 2025-03-06 19:34:46 -05:00
thibhero
885b7c6f4f checking other tests functions 2025-03-05 23:57:58 -05:00
thibhero
640c5175fb creating install test with dependencies 2025-03-05 21:31:21 -05:00
thibhero
665fbc382d second test for install with dependencies 2025-03-05 17:38:55 -05:00
thibhero
817c40d261 test for upgrade_spec.rb 2025-03-05 17:37:25 -05:00
thibhero
b7a298e1ec first test to check option --ask 2025-03-02 20:04:02 -05:00
Mike McQuaid
8adc188992
Import brew alias and brew unalias commands
Import these from the homebrew/aliases tap and deprecate that tap.

This required a little messing around with class/module/constant names
to get `brew tests` and `brew typecheck` to play nicely.

I added also added Sorbet type signatures and integration tests.
2025-02-07 14:31:50 +00:00
Douglas Eichelberger
fe7c76196c
Merge pull request #19215 from Homebrew/concurrency-test
Add test for concurrent fetching
2025-02-05 14:52:57 +00:00