436 Commits

Author SHA1 Message Date
Mike McQuaid
07091cfbea
Simplify pluralisation of common words
Formulae, dependencies, tries are all used in multiple places so let's
simplify them
2025-09-12 09:02:43 +01:00
Rylan Polster
3dff8dfb62
Create DownloadQueue helper to check concurrency and initialize 2025-08-25 13:39:35 -04:00
Eric Knibbe
e021953db4
messages/comments: formatting fixes 2025-08-16 00:54:50 -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
Eric Knibbe
fe13aac730
Manpage: source wording & formatting fixes 2025-08-01 23:43:46 -04: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
Patrick Linnane
4513a43d53
Fix RuboCop failures.
Co-authored-by: Patrick Linnane <patrick@linnane.io>
Co-authored-by: Carlo Cabrera <github@carlo.cab>
Co-authored-by: Thierry Moisan <thierry.moisan@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-07-14 19:12:38 +01:00
thibhero
6d0a77fc79 fixing method refactoring 2025-06-20 12:32:46 -04:00
thibhero
19901b5332 refactoring style to resolve the last discussions 2025-06-18 16:05:19 -04:00
thibhero
fe06e04e28 refactoring install.rb and reinstall.rb after removing Formula.installed 2025-06-17 21:12:47 -04:00
thibhero
7e876e4681 resolving discussions 2025-06-11 22:35:00 -04:00
Mike McQuaid
dffa42839c
Merge branch 'master' into master 2025-06-11 13:24:46 +01:00
thibhero
aa47105d2a refactoring code 2025-06-09 00:14:16 -04:00
thibhero
a5251b2fb6 refactoring install 2025-06-08 12:34:24 -04:00
Eric Knibbe
3dc9e88542
parser: show related env var in switch description 2025-06-03 13:57:42 -04:00
thibhero
499a9b9dae changing to installed_formulae, as its checked if it should be installed 2025-05-07 12:08:46 -04:00
thibhero
f875dbc8a7 Implementing ask input with casks
renamed `ask` to `ask_formulae`
moving option `--ask` to work with formulae and casks
2025-05-07 12:07:29 -04:00
thibhero
5013c17474 formatting correctly with brew style 2025-05-03 15:39:43 -04:00
thibhero
96ca8d2e07 displaying a warning if ask is used with casks 2025-05-03 15:23:42 -04:00
Mike McQuaid
e41a1f6d8a
Add brew install --as-dependency
This option avoids needing to immediately use
`brew tab --no-installed-on-request` when manually installing a
dependency.
2025-03-21 15:49:22 +00:00
Mike McQuaid
ae7b0c10f3
Merge pull request #19254 from tyuwags/install-size
Install size
2025-03-11 09:54:03 +00:00
thibhero
99fad7797c modifying files with brew style 2025-03-06 21:27:13 -05:00
Eric Knibbe
c5ec1fa61b
cask/installer: pass more options to cask dependencies 2025-03-06 14:10:37 -05:00
thibhero
0b53e54bfa Moving ask input to Install.ask 2025-03-05 17:38:18 -05:00
thibhero
1a43a9d258 extracting method to Homebrew/install.rb 2025-02-18 22:41:40 -05:00
thibhero
8299c59801 pass brew typecheck, brew style and brew tests 2025-02-16 00:06:23 -05:00
thibhero
97678708db removing useless statements 2025-02-12 16:05:11 -05:00
thibhero
f1906c1682 adding exit status if declined 2025-02-12 15:59:35 -05:00
thibhero
cb947b9cf4 erratum on variable 2025-02-12 15:57:12 -05:00
thibhero
081db50196 Copying function from branch upgrade-reinstall-size into install.rb and adding parameter 2025-02-11 19:46:38 -05:00
thibhero
403887deb6 moving back to --ask option 2025-02-07 15:23:36 -05:00
thibhero
bebbd6274e corrected version for brew style 2025-02-07 15:10:27 -05:00
thibhero
354849895a changing ask_input function to lambda 2025-02-07 14:39:22 -05:00
thibhero
73758398e1 resolving typecheck error 2025-02-07 14:14:52 -05:00
thibhero
be1a4c03af optimising the code, removing begin block 2025-02-07 14:02:53 -05:00
thibhero
bbd8aeb80f Applying the changes discussed 2025-02-07 11:49:38 -05:00
thibhero
0cc688f843 resolving typecheck and final tests 2025-02-06 12:37:19 -05:00
thibhero
0d2afcffe6 Erratum on environment variable if condition 2025-02-06 09:53:57 -05:00
thibhero
c8a9cfa4d0 Add support for the HOMEBREW_ASK environment variable 2025-02-06 09:07:55 -05:00
thibhero
f989e9a674 rearranging code to work with many formula and not only with last one 2025-02-05 21:58:31 -05:00
thibhero
e47bdd9ad0 Getting input of user and proceeding the different output 2025-02-05 21:20:17 -05:00
thibhero
87492f8fbe fetching dependencies and calculating bottle and install size 2025-02-05 20:50:05 -05:00
Mike McQuaid
bbf5a9f479
env_config: use environment variables consistently
- use e.g. `$HOMEBREW_*` for cases where only the environment variable
  is the entire backtick-quoted string
- use e.g. `${HOMEBREW_*}` for cases where the environment variable is
  part of a backtick-quoted string to make clear what parts are variable
  and what parts are not
- use `export HOMEBREW_*=...` for cases where we're talking about
  setting the environment variable (because it likely needs to be
  exported to work how they want)

Inspired by https://github.com/Homebrew/homebrew-bundle/pull/1579 making
similar changes for Homebrew/homebrew-bundle.
2025-01-27 14:21:27 +00:00
Mike McQuaid
b49625a7dc
Add brew install --skip-link
We already have `--skip-post-install` and this adds similar behaviour
for e.g. `brew bundle` (and other users) to be able to install a
formula but skip the `brew link` stage afterwards.
2025-01-23 14:42:03 +00:00
Mike McQuaid
d1e539cb84
Merge pull request #18547 from Homebrew/cask-formula-dep-preinstall
Perform preinstall checks when a formula is installed via a cask
2024-10-13 17:40:59 +01:00
Bob Lail
a5db113d91 feat: Install an unlinked formula via brew install if --overwrite is passed
If the intention is to overwrite any existing links, then `brew install` should go on to install over an unlinked formula
2024-10-12 11:50:51 -07:00
Bo Anderson
97866f8adf
Perform preinstall checks when a formula is installed via a cask 2024-10-11 16:57:47 +01:00
Markus Reiter
404176af1d
Implement Downloadable for more types. 2024-09-04 22:54:28 +02:00
Michael Cho
a548a81040
docs: remove references to deprecated/disabled GCC formulae 2024-09-02 12:03:06 -04:00
Kevin
d686be67c6
Merge pull request #17761 from eaze/cask-quiet-upgrade
Add better "--quiet" support to cask upgrade
2024-07-19 22:54:51 -07:00