2395 Commits

Author SHA1 Message Date
Sam Ford
ba0bc88b3d
AbstractUninstall: coerce which argument to String
`Cask::Artifact::AbstractUninstall.uninstall_script` contains a
`which` call that uses a `Pathname` argument instead of a `String` and
this leads to a type error (`Parameter 'cmd': Expected type String,
got type Pathname with value...`). This resolves the error by calling
`#to_s` on the `executable_path` argument.
2025-08-28 11:21:57 -04:00
Douglas Eichelberger
d97933b38c
Refactor T.must called on .first 2025-08-25 20:27:47 -07:00
Rylan Polster
3dff8dfb62
Create DownloadQueue helper to check concurrency and initialize 2025-08-25 13:39:35 -04:00
Rylan Polster
5d13ce9280
Remove unused cask url do code 2025-08-23 15:02:23 -04:00
Mike McQuaid
a1f112f3fe
Move o* output methods to Utils::Output
This reduces the surface area of our `Kernel` monkeypatch and removes
the need to `include Kernel` in a bunch of modules.

While we're here, also move `Kernel#require?` to `Homebrew` and fully
scope the calls to it.
2025-08-20 19:20:19 +01:00
copilot-swe-agent[bot]
8b10231085
Fix conflicts_with stanza odeprecated method call issue
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-19 17:07:37 +01:00
Mike McQuaid
a71d5e835f
More Sorbet typed: strict files
Add the necessary changes for Sorbet `typed: strict` in more files.

Co-authored-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2025-08-19 13:03:08 +01:00
Bevan Kay
69145c911d
cask/dsl/rename: add api support 2025-08-19 11:47:15 +10:00
Mike McQuaid
d13aaf94db
Deprecate conflicts_with formula: in Cask DSL.
This is outside of our usual deprecation process but it's a no-op method
that does, and has always done, nothing so it doesn't make sense to wait
another 2.5 months before deprecating it.

While we're here, make `conflicts_with` `typed: strict` in Sorbet.
2025-08-18 19:25:54 +01:00
Bevan Kay
ee7b71935e
Merge pull request #20488 from Homebrew/rosetta-audit-fix
cask/audit: correctly filter artifact types in audit
2025-08-18 08:27:49 +00:00
Bevan Kay
869bdfa10a
cask/dsl: remap unsigned to fails_gatekeeper_check 2025-08-18 18:04:58 +10:00
Bevan Kay
97b1683466
cask: replace unsigned deprecation reason with fails_gatekeeper_check 2025-08-18 18:04:57 +10:00
Bevan Kay
c566ba00c7
cask/audit: correctly filter artifact types in test 2025-08-18 18:02:50 +10:00
Mike McQuaid
24057cc9a5
Merge pull request #20485 from SMillerDev/feat/audit/codeberg_audit
feat: audit codeberg repos
2025-08-18 07:50:25 +00:00
Sean Molenaar
b19ad2e796 feat: audit codeberg repos 2025-08-17 17:08:33 +02:00
Eric Knibbe
12e4c8a05e
sync output of sudo messaging 2025-08-16 00:57:59 -04:00
Eric Knibbe
e021953db4
messages/comments: formatting fixes 2025-08-16 00:54:50 -04:00
Mike McQuaid
7634fe375e
Merge pull request #20455 from Homebrew/copilot/fix-20454
Fix audit_signing to skip when quarantine attribute is missing
2025-08-14 09:45:36 +00:00
copilot-swe-agent[bot]
51565f97ae Remove unnecessary comments that duplicate debug messages
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-14 09:30:23 +00:00
Mike McQuaid
5602f0e11e
Merge pull request #20451 from Homebrew/dependabot/all-dbdec0a9b9
Bump the "all" group with 2 updates across multiple ecosystems
2025-08-14 09:10:26 +00:00
copilot-swe-agent[bot]
d0ad96a9b3
Fix audit_signing to check quarantine availability and attributes
Co-authored-by: bevanjkay <40621599+bevanjkay@users.noreply.github.com>
2025-08-14 19:09:57 +10:00
Mike McQuaid
7dd47ca89a
Merge pull request #20421 from Homebrew/cask-rename-stanza
cask/dsl/rename: add new `rename` dsl
2025-08-14 08:51:45 +00:00
Bevan Kay
ce49855b3e
cask/quarantine: fix quarantine support 2025-08-14 12:51:59 +10:00
Patrick Linnane
2605529a90
brew style --fix 2025-08-13 12:23:12 -07:00
copilot-swe-agent[bot]
4ee43fbde1
Improve quarantine support error messages with specific CLT guidance
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-13 14:30:05 +01:00
Rylan Polster
0f9fb4f29a
Use API helper methods 2025-08-12 17:04:15 -04:00
Bevan Kay
9cb2b65319
cask/dsl/rename: add new rename dsl 2025-08-12 23:24:20 +10:00
copilot-swe-agent[bot]
cbe347782c
Implement formula conflict detection for cask binary artifacts
While we're at it, update copilot instructions.

Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
2025-08-12 10:42:51 +01:00
Rylan Polster
8aabee74a6
Store cask API data for use in to_hash_with_variations 2025-08-11 22:06:07 -04:00
Rylan Polster
ff5edb73c2
Don't query analytics for third-party formulae/casks in brew info 2025-08-11 18:54:09 -04:00
Bevan Kay
c83f77b091
cask/audit: add skiplist for signing audit 2025-08-11 22:08:05 +10:00
Bevan Kay
12f6e871c7
cask/audit: apply suggestion from code review
Co-authored-by: Carlo Cabrera <github@carlo.cab>
2025-08-11 15:26:44 +10:00
Bevan Kay
5c06d6f184
cask/audit: apply suggestion from code review
Co-authored-by: Carlo Cabrera <github@carlo.cab>
2025-08-11 15:26:36 +10:00
Bevan Kay
34f659cb64
cask/audit: iterate over artifacts in rosetta/signing audit 2025-08-11 14:12:34 +10:00
Eric Knibbe
626b6aca2d
RubyDoc output fixes 2025-08-05 17:13:42 -04:00
Mike McQuaid
64311c2889
Add Cask::Installer#prelude to check before download queueing
Fixes #20374

When using HOMEBREW_DOWNLOAD_CONCURRENCY, cask binaries were being
downloaded before checking if the cask could actually be installed
(e.g., disabled casks or conflict checks). This resulted in unnecessary
downloads for casks that would ultimately fail to install.

This change adds a `prelude` method to Cask::Installer that performs
early validation checks (deprecation/disable status and conflicts)
similar to Formula#prelude_fetch. The prelude method is called before
enqueueing downloads in all download queue scenarios (install, reinstall,
and upgrade commands), ensuring that validation failures occur before
the "Fetching downloads for:" message is displayed.

Key changes:
- Add Cask::Installer#prelude method with @ran_prelude tracking
- Call prelude before enqueueing downloads in install/reinstall/upgrade
- Refactor to avoid creating installer objects multiple times
- Maintain backward compatibility for non-download-queue scenarios

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-05 14:38:24 +01:00
Mike McQuaid
3261a07bd0
Merge pull request #20370 from Homebrew/improve_download_queue_output
Improve Download Queue output
2025-08-04 15:30:10 +00:00
Mike McQuaid
774ef54981
Improve Download Queue output
Update the naming, presence and values for various download queue
methods to improve the output for users while making the internal code
a little easier to follow.

While we're here, also ensure that a single formula download still
displays the download queue output and indirectly fix an issue with
bottle manifests being named incorrectly.
2025-08-04 15:51:02 +01:00
Eric Knibbe
6255263b51
output: express environment variables consistently 2025-08-04 09:50:06 -04:00
Mike McQuaid
bcdb1d3af6
Merge pull request #20343 from Homebrew/fix_uri_parser_warning
Fix URI parser warning
2025-07-31 13:38:39 +00:00
Mike McQuaid
34bc30d639
Fix URI parser warning 2025-07-31 12:21:19 +01: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
Douglas Eichelberger
7fb928ccf4
Merge pull request #20325 from Homebrew/dug/typed-cask-audit
Enable strict typing in Cask::Audit
2025-07-30 20:23:18 +00:00
Douglas Eichelberger
157992be17
Enable strict typing in Cask::Audit 2025-07-30 12:43:32 -07:00
Mike McQuaid
bafc57cfe1
Add Cask install/upgrade/reinstall support for download queue
This will allow installing/upgrading/reinstalling casks and all their
dependencies in parallel.
2025-07-30 08:18:35 +01:00
Mike McQuaid
0c969c2f82
Merge pull request #20311 from Homebrew/quieter_debug
Make `--debug` output a bit quieter by default
2025-07-25 16:28:33 +00:00
Mike McQuaid
312f046302
Make --debug output a bit quieter by default
The `Formulary` and `system_command` debug output is incredibly verbose
by default and this is pretty annoying when all you want is to get
better backtraces when there's an error.

Instead, let's require `--verbose` and `--debug` for the noisiest output
message types.
2025-07-25 17:14:46 +01:00
Bevan Kay
b1a74330d7
cask/audit: skip signing audit without gktool
replace `odebug` with `opoo`

Co-authored-by: Carlo Cabrera <github@carlo.cab>

cask/audit: fix style
2025-07-25 14:40:46 +10:00
Patrick Linnane
a190b1fd42
Merge pull request #20303 from Homebrew/signing-audit
cask/audit: use `gktool` for signing audit
2025-07-24 17:02:05 +00:00
Mike McQuaid
e10d4c43c2
Optionally use DownloadQueue for reinstall, upgrade.
Follow up on `DownloadQueue` for download concurrency on `brew fetch`
and `brew install` to also add support for `brew reinstall` and
`brew upgrade`.

This required a fair bit of refactoring to make this work so I've also
made `install.rb`, `reinstall.rb` and `upgrade.rb` `typed: strict` to
add some extra guardrails from Sorbet here.

Co-authored-by: Carlo Cabrera <github@carlo.cab>
2025-07-24 15:41:03 +01:00