417 Commits

Author SHA1 Message Date
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
apainintheneck
52cf4e30fc Share attestation formula sorting and gh exe checking logic
This adds a new method to either move the `gh` formula to the front
of the formula list to be installed or checks that the `gh` formula
is already installed some other way.
2024-07-18 21:32:50 -07:00
Nanda H Krishna
8839ccfe72
Fix tests for attestations 2024-07-17 14:48:53 -04:00
Nanda H Krishna
d2d814414e
cmd/{install,reinstall,upgrade}: ensure that gh is installed 2024-07-17 14:48:52 -04:00
Nanda H Krishna
51ec743d6f
Remove ensure_gh_installed!
Co-authored-by: William Woodruff <william@yossarian.net>
2024-07-17 14:48:52 -04:00
Nanda H Krishna
4d387d285e
Fix type and style errors 2024-07-17 14:46:59 -04:00
Nanda H Krishna
3bb91601fb
Ensure early installation of gh for attestations 2024-07-17 14:46:58 -04:00
Eric Sampson
d40ab11784 Add "-quiet" support to cask updgrade 2024-07-15 11:50:37 -05:00
Rylan Polster
5030ad6f28
Require utils/backtrace when install fails 2024-07-14 14:37:30 -04:00
Todd Schulman
827f475851 fix: dependencies message; empty formulae return
- All dependencies satisfied message applies to both formulae and casks.
- Trigger the empty formulae return condition only if formulae are present.
2024-04-09 01:50:29 -04:00
Todd Schulman
18e2a37d14 cmd: allow --display-times with --cask 2024-04-09 01:50:29 -04:00
Douglas Eichelberger
0fd082a1ff Port Homebrew::Cmd::InstallCmd 2024-03-30 09:36:47 -07:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Markus Reiter
3da0f8c4a6
Fix loading casks/formulae from relative paths. 2024-03-01 04:05:15 +01:00
Markus Reiter
29179e45a1
Refactor rename/migration handling in Formulary. 2024-02-06 00:52:38 +01:00
Eric Knibbe
e63b1f4da5
docs: monospace suggested values 2024-02-04 15:42:26 +01:00
apainintheneck
85bd4c7e1f utils/backtrace: scrub sorbet-runtime from backtrace
Ever since we started using this at runtime it's been polluting
the backtrace output. This makes it harder to debug errors and
increases the amount of info users have to paste into the box
when filing an issue.

This is a very direct approach. Essentially, we strip out
everything related to the `sorbet-runtime` gem whenever the top
line in the backtrace is unrelated to sorbet-runtime.

The hope is that this will allow errors related to sorbet to
be diagnosed easily while also reducing the backtrace size
for all other types of errors.

Sometimes it is useful to see the full backtrace though.
For those cases, we include the full backtrace when
`--verbose` is passed in and print a warning that the
Sorbet lines have been removed from the backtrace the
first time they are removed.

Note: This requires gems to be set up so that the call to
`Gem.paths.home` works correctly. For that reason, it must
be included after `utils/gems` which is included in
`standalone/load_path` already.
2023-09-21 21:07:22 -07:00
Eric Knibbe
931f762598
docs+rubydoc: various grammar/wording fixes 2023-09-11 02:26:37 -04:00
Mike McQuaid
71a4421c6c
cmd/install: add missing require.
Fixes #15748
2023-07-25 10:08:49 +01:00
apainintheneck
c9dea04bd4 cmd/install: upgrade already installed casks
Previously, the behavior was to warn users that a cask was already
installed and then skip modifying the installed version. This is
different to how we handled things with formulas. For them we would
upgrade any already installed formulas. This just brings casks in line
with what we already do with formulas.

Changes:
- cmd/install: Upgrade already installed casks if HOMEBREW_NO_INSTALL_UPGRADE
  is not set
- env_config: Update wording of HOMEBREW_NO_INSTALL_UPGRADE to include casks
- remove error that was only used to alert about already installed casks

Note:
- The upgrade command for casks defaults to --greedy when you pass named casks
  to the command which means that this will always default to that behavior
  since you must specify the name of the cask when installing.
2023-07-23 18:50:39 -07:00