35726 Commits

Author SHA1 Message Date
Rylan Polster
fa45209f09
Fix sharded API structure to match existing API 2025-06-03 16:58:47 -04:00
Eric Knibbe
3dc9e88542
parser: show related env var in switch description 2025-06-03 13:57:42 -04:00
Rylan Polster
c03f70f1dc
Refactor OnSystem and SimulateSystem bottle tag handling 2025-06-03 11:57:17 -04: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
Rylan Polster
0f03757e8f
Shard JSON API by OS/Arch combination 2025-06-02 23:06:02 -04:00
Mike McQuaid
7c5affa824
brew.sh: move sudo reset timestamp.
Let's move this from `bin/brew` to make things like e.g. `brew --prefix`
or `brew shellenv` not reset the sudo timestamp.

This is still in a place that ensures that e.g. no untrusted formula or
tap code has been run yet so should have no security implications but
provide mild usability improvements.
2025-06-02 15:09:27 +01:00
Eric Knibbe
cd6777fc73
audits: quote and reword problem description text 2025-05-30 23:49:26 -04:00
Mike McQuaid
e71b1473b8
formula_creator: tweak variable name 2025-05-30 14:55:50 +01:00
Anatoli Babenia
87e57368d4 create: explain file header length logic 2025-05-30 11:12:36 +03:00
Anatoli Babenia
d860fa1fa8 create: fix archive check if HTML starts with spaces 2025-05-30 11:12:36 +03:00
Bevan Kay
6278ac1801
Merge branch 'master' into cabal 2025-05-29 22:44:20 +10:00
botantony
9425734b4f
autobump_constants: add :requires_manual_review reason
Signed-off-by: botantony <antonsm21@gmail.com>
2025-05-27 21:48:58 +02:00
Kristján Oddsson
972414cec7 add a T.must after fetching tap 2025-05-27 16:55:00 +00:00
Kristján Oddsson
7476f09672 format 2025-05-27 16:43:54 +00:00
Kristján Oddsson
0480411c6f
use conditional assignment operator
Co-authored-by: Bo Anderson <mail@boanderson.me>
2025-05-27 16:35:50 +00:00
Kristján Oddsson
24d9524bbd remove T.must to avoid full fetch 2025-05-27 16:01:35 +00:00
Kristján Oddsson
9e05995299 move git fetch before getting origin_branch_name 2025-05-27 14:54:57 +00:00
Mike McQuaid
2131d70265
workflows/pkg-installer: fix release upload.
- Get the release tag from the installer path.
- Remove unnecessary `gh` installation.
- Remove failing test that I can't fix.
2025-05-27 11:47:00 +01:00
Mike McQuaid
1035024b83
Revert "feat: allow env for write_jar_script" 2025-05-26 17:19:48 +01:00
Sean Molenaar
f420f0f63d
Merge pull request #19946 from Homebrew/SMillerDev-patch-1
feat: allow env for write_jar_script
2025-05-26 14:36:15 +00:00
Sean Molenaar
81ea767ea3
Update Library/Homebrew/extend/pathname.rb 2025-05-26 21:17:05 +09:00
Bevan Kay
d416755560
Merge pull request #20005 from gibfahn/bump_write_only
bump-pr: respect --write-only flag and skip git operations
2025-05-26 08:41:55 +00:00
Mike McQuaid
a2894caceb
Merge pull request #20004 from Homebrew/formula-creator-ruby-rework
formula_creator: Update Ruby template
2025-05-26 07:41:51 +00:00
Mike McQuaid
3f15e0eef0
dev-cmd/bump-formula-pr: fix style. 2025-05-26 08:40:14 +01:00
Daeho Ro
24cd62140d
feat: add _ to powershell completion filename 2025-05-25 00:15:26 +09:00
Gibson Fahnestock
97acfb94ce
bump-pr: respect --write-only flag and skip git operations
The flag used to work well, but at some point started to run more and
more git actions. We use this to update formula and casks in other
homebrew taps, and it works well except for this issue.
2025-05-24 13:14:00 +01:00
Patrick Linnane
5ee4e609ac
formula_creator: Update Ruby template
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-05-23 20:58:02 -07:00
Bo Anderson
418a771d12
bundle: add support for selective cleanup 2025-05-23 06:19:01 +01:00
Mike McQuaid
3f450e5f10
Merge pull request #19959 from botantony/uninstall-etc
uninstall: exclude configurational filess that belong to other formulae
2025-05-22 09:17:47 +00:00
botantony
ac2d167ffc
cask/dsl: set no_autobump! if livecheck uses :extract_plist
Signed-off-by: botantony <antonsm21@gmail.com>
2025-05-21 23:23:29 +02:00
Mike McQuaid
4887d58826
Merge pull request #19995 from Homebrew/fix_truncate
dev-cmd/bump-formula-pr: use `Formatter.truncate`.
2025-05-21 16:16:56 +00:00
Mike McQuaid
77c7587d77
Merge pull request #19993 from Homebrew/bundle_exec_exit_code
bundle/commands/exec: fix exit code handling.
2025-05-21 16:10:53 +00:00
Mike McQuaid
4aa7f83954
dev-cmd/bump-formula-pr: use Formatter.truncate.
Add new `Formatter.truncate` method, tests and use it.
2025-05-21 17:02:18 +01:00
Anton Melnikov
2f10b1cd6e
uninstall: style suggestions
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-05-21 17:54:21 +02:00
Mike McQuaid
e8e8fcea02
bundle/commands/exec: fix exit code handling.
In some `brew tests` runs, `$CHILD_STATUS` can be `nil`.
Let's handle this and avoid these flaky tests.
2025-05-21 16:31:30 +01:00
botantony
3dad44c9f3
uninstall: exclude configurational filess that belong to other formulae
Signed-off-by: botantony <antonsm21@gmail.com>
2025-05-21 17:05:51 +02:00
Issy Long
01e0d4b311
Merge pull request #19989 from Homebrew/truncate-really-long-release-notes
Truncate long release notes in formula PR descriptions
2025-05-21 14:48:53 +00:00
Eric Knibbe
5027a9d2f2
cask/audit: skip audit_rosetta on Intel-only casks & OSes 2025-05-21 10:14:08 -04:00
Issy Long
63cdd0723c
Truncate long release notes in formula PR descriptions
- Some formula bumps have really long release notes which causes their
  bump PRs to exceed GitHub's 65k character limit for issue bodies.
2025-05-21 13:20:48 +00:00
Mike McQuaid
8b32d019d4
Merge pull request #19986 from Homebrew/fix_update_maintainers
dev-cmd/update-maintainers: various fixes.
2025-05-21 12:42:38 +00:00
Issy Long
ee15435a90
Fix multiline hash key/value indentation 2025-05-21 14:31:58 +02:00
Mike McQuaid
c1a2f94e01
dev-cmd/tap-new: fix root_url warning.
Ruby couldn't detect the `root_url` usage inside the ERB template.
Instead, use interpolation so it can for a fixed warning and more concise
syntax.
2025-05-21 13:19:11 +01:00
Mike McQuaid
a94037a6ff
dev-cmd/update-maintainers: various fixes.
- install the `man` gem group for `kramdown` so
  `Manpages.regenerate_man_pages` can run successfully
- hardcode the non-organisation PLC members so that they aren't
  missing from the GitHub team
- correctly populate the PLC members again
2025-05-21 13:08:37 +01:00
Colin Dean
d5b3ae095c
Prohibit non-ASCII characters in URLs, nudge toward punycode
Inspired by curl's blog post, [Detecting malicious Unicode][1], this likely captures most if not all cases and nudges the user toward supplying IDNs with punycode.

A possible improvement would be telling the user exactly what punycode domain to use instead, but that may require another library as I can't quickly find something built into the Ruby stdlib that handles punycode encoding.

[1]: https://daniel.haxx.se/blog/2025/05/16/detecting-malicious-unicode/

Co-authored-by: Štefan Baebler <319826+stefanb@users.noreply.github.com>
2025-05-21 12:42:07 +01:00
Douglas Eichelberger
cd86e43fb1
Add rubocop exclusion 2025-05-20 20:59:24 -07:00
Douglas Eichelberger
1d4f1481ae
brew tc --update 2025-05-20 20:57:13 -07:00
Douglas Eichelberger
38bad25a86
Include annotations in typecheck updates 2025-05-20 20:56:53 -07:00
Patrick Linnane
cdf3964753
Merge pull request #19981 from Homebrew/dependabot/bundler/Library/Homebrew/ruby-lsp-0.23.21
build(deps-dev): bump ruby-lsp from 0.23.20 to 0.23.21 in /Library/Homebrew
2025-05-20 21:07:21 +00:00
Patrick Linnane
df306e1426
Merge pull request #19978 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-251ed9551b
build(deps): bump the sorbet group in /Library/Homebrew with 4 updates
2025-05-20 21:07:05 +00:00