3509 Commits

Author SHA1 Message Date
Bevan Kay
12ea343c9f
fix brew typecheck 2025-09-02 15:55:09 +08:00
Patrick Linnane
a8b4d115f2
brew style --fix
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-09-02 15:55:08 +08:00
copilot-swe-agent[bot]
f973bea35c
Remove obvious comments as requested in review
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-09-02 15:55:08 +08:00
copilot-swe-agent[bot]
ac6f770cdc
Address review feedback: fix description, use if/else, enable quarantine, improve fetch efficiency, and use local test cask
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-09-02 15:55:08 +08:00
copilot-swe-agent[bot]
6be546a5bc
Skip git logic for casks as they don't need it for patch creation
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-09-02 15:55:08 +08:00
copilot-swe-agent[bot]
88b7d2900a
Address fetching consistency concern and fix cask path handling
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-09-02 15:55:07 +08:00
copilot-swe-agent[bot]
a9cd0c4b5d
Add cask support to brew unpack command
Co-authored-by: p-linnane <105994585+p-linnane@users.noreply.github.com>
2025-09-02 15:55:07 +08:00
Douglas Eichelberger
240fd71e6f
Avoid repeated calls to affix checks 2025-08-31 11:11:41 -07:00
Mike McQuaid
12a31a1f6a
Merge pull request #20578 from Homebrew/dug/t-must-cleanup
Remove unnecessary use of `T.must`
2025-08-26 07:33:04 +00:00
Mike McQuaid
29518275d1
Merge pull request #20569 from Homebrew/bump-handle-skipped
bump: respect livecheck skipped status
2025-08-26 07:32:12 +00:00
Douglas Eichelberger
d97933b38c
Refactor T.must called on .first 2025-08-25 20:27:47 -07:00
Michael Cho
8b3b832e03
dev-cmd/pr-publish: default to main branch 2025-08-25 14:01:58 -04:00
Sam Ford
1d47038b12
bump: respect livecheck skipped status
`brew bump` understands that some formulae/casks are skipped by
livecheck but it doesn't use this information to avoid doing
unnecessary or inappropriate work. This modifies related logic to not
fetch PR information or try to open a version bump PR if livecheck is
skipped. livecheck is our only source of version information these
days, so we can't try to version bump a package if we don't have
upstream version information.

This has been leading to an "Invalid usage: `--version` must not be
empty" error and this _should_ fix the issue under these particular
circumstances. There's still plenty of room for improvement in how
all of this is handled in bump but this is just a quick bug fix.
2025-08-25 10:07:17 -04:00
Douglas Eichelberger
ceb2291be1
Enable strict typing in Kernel extensions + utils.rb 2025-08-23 18:44:36 -07:00
Mike McQuaid
c760afc66e
dev-cmd/bump: adjust system call.
Instead of immediately failing let's set `Homebrew.failed` to `true` to
set a non-zero exit code but continue with the rest of formulae/casks.
2025-08-22 15:54:51 +01:00
Mike McQuaid
621114488e
Add brew style --changed
This emulates `brew tests --changed` but for style checks. Should make
things a bit quicker for the case of wanting to quickly fix up
local files.
2025-08-22 14:33:20 +01:00
Mike McQuaid
7878c73b85
Merge pull request #20537 from Homebrew/dependabot/all-de17bcb037
Bump the "all" group with 2 updates across multiple ecosystems
2025-08-22 12:47:27 +00:00
Mike McQuaid
96230dc22b
dev-cmd/bump: fix system call.
This was using `system` instead of `safe_system` which ignores failures.
2025-08-22 13:06:31 +01:00
Mike McQuaid
02c2a348c4
brew style --fix 2025-08-22 10:41:43 +01:00
Mike McQuaid
e4e6185272
Merge pull request #20524 from Homebrew/fetch_api_files_refactoring
Refactor Homebrew::API.fetch_api_files! to not take arguments.
2025-08-20 15:26:44 +00:00
Mike McQuaid
d2de1d5b7d
Refactor Homebrew::API.fetch_api_files! to not take arguments.
Was thinking about this a bit and feels a bit nicer to DRY this up.
2025-08-20 08:51:11 +01:00
Justin Krehel
1f0ddcc791
formula-analytics: reduce noise from Linux builds
Frequent Linux builds add a number of low count unique OS variations to
analytics, so compress into a major version for displaying
2025-08-19 21:42:19 -04:00
Mike McQuaid
88d2b74ee5
dev-cmd/tests: fetch JSON API files if needed.
If HOMEBREW_NO_INSTALL_FROM_API was set, we hadn't fetched JSON API
files so will need to fetch them for a valid test environment.
2025-08-19 19:18:31 +01:00
Rylan Polster
4b4378943a
Fix formula-analytics pretty OS name logic 2025-08-19 03:12:32 -04:00
Mike McQuaid
1101689af2
Merge pull request #20500 from Homebrew/bump-pr-tap
dev-cmd/bump-*-pr: automatically tap core taps if needed.
2025-08-18 17:09:40 +00:00
Mike McQuaid
93807db8c2
dev-cmd/bump-*-pr: automatically tap core taps if needed.
If the tap isn't tapped already, automatically tap it.
2025-08-18 17:49:06 +01:00
Mike McQuaid
2dfc1b4eb8
Merge pull request #20498 from Homebrew/analytics_pretty_name
Move formula analytics pretty name logic to `MacOSVersion`.
2025-08-18 16:16:53 +00:00
Mike McQuaid
435158884d
Move formula analytics pretty name logic to MacOSVersion.
This makes sense to centralize these so when we support new macOS
versions we can just add them to the
`VERSIONS_TO_ANALYTICS_PRETTY_NAMES` hash.
2025-08-18 16:57:20 +01:00
Mike McQuaid
22fdb11e00
**/keg_relocate.rb: add set Sorbet typed: strict
Other files have been changed where required.
2025-08-18 15:02:15 +01:00
Carlo Cabrera
145c65d811
Merge remote-tracking branch 'origin/main' into stricter-brew-wrappers 2025-08-18 18:41:19 +08:00
Eric Knibbe
e021953db4
messages/comments: formatting fixes 2025-08-16 00:54:50 -04:00
Patrick Linnane
4d134f3aa1
formula-analytics: add macOS Tahoe
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-08-15 08:07:06 -07:00
Mike McQuaid
c2fbebb96d
Merge pull request #20420 from Homebrew/copilot/fix-19743
Implement selective path replacement for /usr/local to fix bottle creation issues
2025-08-13 15:42:49 +00:00
copilot-swe-agent[bot]
9328a55c54
Fix overzealous /usr/local prefix replacement
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-13 16:22:09 +01:00
Sam Ford
76a54d1455
bump-cask-pr: ensure new_cask has a url
We sometimes see errors like "attempted to use a `Downloadable`
without a URL!" in the homebrew/cask autobump workflow log because
`bump-cask-pr` can simulate Linux even if a cask doesn't support it,
leading to this error. This is something that should be resolved in
the future once I finally wrap up my related work to detect OS/arch
requirements but this adds a simple guard to address this in the
interim time.
2025-08-13 10:01:49 -04:00
Rylan Polster
0f9fb4f29a
Use API helper methods 2025-08-12 17:04:15 -04:00
Rylan Polster
5e2b54881c
Use hash for internal cask API 2025-08-11 15:03:05 -04:00
Rylan Polster
d3aac3fa5f
Include aliases, renames, and tap migrations in minimal APIs 2025-08-11 00:37:50 -04:00
Carlo Cabrera
a7c124c2d0
brew.sh: enforce HOMEBREW_FORCE_BREW_WRAPPER more strictly
`HOMEBREW_FORCE_BREW_WRAPPER` can be used as a security/compliance
feature, but allowing it to be disabled by setting
`HOMEBREW_NO_FORCE_BREW_WRAPPER` leaves a pretty large hole in it that
allows it to be sidestepped.

Let's fix that by actually checking the path of the process that called
`brew`, and the verify that that path matches the configured value of
`HOMEBREW_NO_FORCE_BREW_WRAPPER`.
2025-08-09 03:15:53 +08:00
Eric Knibbe
626b6aca2d
RubyDoc output fixes 2025-08-05 17:13:42 -04:00
Douglas Eichelberger
40c58a883d
Enable strict typing in Tap 2025-08-04 13:11:15 -07:00
Eric Knibbe
6255263b51
output: express environment variables consistently 2025-08-04 09:50:06 -04:00
Eric Knibbe
fe13aac730
Manpage: source wording & formatting fixes 2025-08-01 23:43:46 -04:00
Carlo Cabrera
fb35add3b6
Replace ensure_formula_installed! with Formula#ensure_installed!
`ensure_formula_installed!` requires the `Formula` class to be loaded
before being called to work properly.

Let's guarantee that instead by implementing it as an instance method of
the `Formula` class.

See discussion at #20358.
2025-08-02 03:43:37 +08:00
Carlo Cabrera
cc5df09845
Ensure we require "formula" before doing ensure_formula_installed!
This is needed to avoid Sorbet runtime errors. See #20352.
2025-08-02 02:46:38 +08:00
Carlo Cabrera
cf6c5acce0
extend/kernel: tighten type sig for ensure_formula_installed!
This does the same as #20356 for `ensure_formula_installed!`. See
discussion at #20352.

Unfortunately, one must still `require "formula"` before using this
method because of the `returns(Formula)`, but tightening the type
signature is generally a good idea anyway.

Closes #20352.
2025-08-02 02:23:47 +08:00
Carlo Cabrera
a9e88acab4
dev-cmd/cat: add require "formula"
Fixes

    ❯ HOMEBREW_BAT=1 brew cat xz
    Error: uninitialized constant Kernel::Formula
    Warning: Removed Sorbet lines from backtrace!
    Rerun with `--verbose` to see the original backtrace
    /opt/homebrew/Library/Homebrew/extend/kernel.rb:445:in 'block in <module:Kernel>'
    /opt/homebrew/Library/Homebrew/dev-cmd/cat.rb:33:in 'block in Homebrew::DevCmd::Cat#run'
    /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.4.5/lib/ruby/3.4.0/fileutils.rb:241:in 'Dir.chdir'
    /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.4.5/lib/ruby/3.4.0/fileutils.rb:241:in 'FileUtils#cd'
    /opt/homebrew/Library/Homebrew/dev-cmd/cat.rb:29:in 'Homebrew::DevCmd::Cat#run'
    /opt/homebrew/Library/Homebrew/brew.rb:113:in '<main>'
    Please report this issue:
      https://docs.brew.sh/Troubleshooting
2025-08-02 01:30:01 +08:00
Mike McQuaid
e3c3f5a356
Deprecate/disable/remove code for Homebrew 4.6
The next minor release will be Homebrew 4.6.0 so let's do the usual
deprecation/disable/remove code cycle.
2025-07-31 12:13:01 +01:00
Carlo Cabrera
99807510f0
dispatch-build-bottle: use main branch
This is really only used in Homebrew/core, so it should be safe to just
change `ref` here to `main`. Without this, `dispatch-build-bottle`
creates PRs that mistakenly target the `master` branch instead of the
`main` branch.
2025-07-21 10:24:23 +08:00
Mike McQuaid
be806e4350
Merge pull request #20218 from Homebrew/add-update-perl-resources
feat: add `update-perl-resources` dev-cmd
2025-07-15 08:28:04 +00:00