403 Commits

Author SHA1 Message Date
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
Bo Anderson
beaa6c32a0
Fix cases of core taps being unnecessarily installed 2023-07-13 20:33:31 +01:00
Bo Anderson
ba02c669e1
Introduce CoreCaskTap class 2023-07-13 20:33:26 +01:00
Mike McQuaid
7da934f7e2
Deprecate/disable/delete code.
The next release after this is merged will be 4.1.0.

Co-authored-by: Markus Reiter <me@reitermark.us>
2023-07-06 16:56:20 +01:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
apainintheneck
e82867a755 cmd/install: warn on cask install when already installed
This was the default behavior before #15273 got merged in to
refactor the `cask/cmd/install` logic into `cmd/install`.
2023-04-23 11:04:25 -07:00
hyuraku
c46ee85e0a remove args.quarantine? nil check 2023-04-19 23:15:12 +09:00
hyuraku
b2156dc125 add casks install to cmd/install 2023-04-19 21:31:22 +09:00
Douglas Eichelberger
09c679e75f Refactor module_function to reduce rbi need 2023-04-17 10:37:59 -07:00
Bo Anderson
3697825784
search: remove remote searching 2023-04-12 13:16:19 +01:00
Ruiyang Wu
007c896c97 Fix brew install --skip-post-install
Previous #15042 doesn't pass the flag all the way to
`FormulaInstaller.new`
2023-03-30 21:08:40 -04:00
Mike McQuaid
95a8c3f638
Add brew install --skip-post-install
Will be needed by `brew test-bot`.
2023-03-23 15:22:27 +00:00
Douglas Eichelberger
d56e2884aa Enable typing in cmd/ 2023-03-06 15:01:08 -08:00
Bo Anderson
e86a8c2477
Move HOMEBREW_NO_INSTALL_FROM_API defaults to shell 2023-02-24 21:53:08 +00:00
Issy Long
298bb65dfb
rubocop: Entirely disable Metrics cops
- These are arbitrary length limits that had a load of disables in code.
- The limits were only increasing over time rather than decreasing.
- Fixing the problematic code to be shorter would take a long time for
  questionable gain since the problem has been around so long.
2023-02-21 00:34:17 +00:00