5407 Commits

Author SHA1 Message Date
thibhero
bb7dcc9384 updating comments 2025-02-16 00:06:57 -05:00
thibhero
8299c59801 pass brew typecheck, brew style and brew tests 2025-02-16 00:06:23 -05:00
thibhero
5c2bbe5911 pass brew typecheck, brew style and brew tests 2025-02-15 23:20:07 -05:00
thibhero
624e960cd5 refactoring lambda as upgrade.RB 2025-02-15 23:02:14 -05:00
thibhero
b821446b6f description of lambda 2025-02-15 23:01:53 -05:00
thibhero
5886b51df7 refactoring and updating functions to correctly print formula to upgrade 2025-02-15 23:00:35 -05:00
Ruoyu Zhong
59445c7961
cmd/info: handle when tab tap is nil 2025-02-13 15:33:45 +08: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
Ruoyu Zhong
7aa1725aff
cmd/info: only display keg info if tap matches
Fixes #19294.
2025-02-13 01:39:21 +08:00
thibhero
1ba3f32026 Adding upgrade arguments in lambda 2025-02-11 20:15:19 -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
9891653aa8 corrected code with brew typecheck 2025-02-11 18:53:10 -05:00
thibhero
a111139682 moving to lambda expressions to respect brew style 2025-02-11 11:06:16 -05:00
thibhero
478035ed90 Copying function from upgrade.rb and implementing with check_dep: false 2025-02-10 23:18:47 -05:00
thibhero
4854113cf9 Add parameter to unify function arguments with reinstall.rb 2025-02-10 23:17:24 -05:00
thibhero
d9846ceda5 refactoring the code to make it clearer 2025-02-10 20:59:27 -05:00
thibhero
3ed1d6ccfb option --ask implementation for formulae dependency and dependant 2025-02-10 20:56:58 -05:00
thibhero
92470e0028 adding the --ask option for the upgrade command 2025-02-09 20:47:35 -05:00
Thibaut Hérault
fc91ddc518
Merge branch 'master' into install-size 2025-02-07 17:45:21 -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
Mike McQuaid
8adc188992
Import brew alias and brew unalias commands
Import these from the homebrew/aliases tap and deprecate that tap.

This required a little messing around with class/module/constant names
to get `brew tests` and `brew typecheck` to play nicely.

I added also added Sorbet type signatures and integration tests.
2025-02-07 14:31:50 +00:00
Thibaut Hérault
c575566928
Merge branch 'master' into install-size 2025-02-06 13:22:26 -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
Eric Knibbe
99de228fc2
docs: various manpage grammar fixes 2025-02-05 13:38:39 +01:00
Markus Reiter
c03a351ab9
Print concurrent download errors. 2025-02-03 14:44:01 +01:00
Markus Reiter
3e8709e4da
Use full terminal height for concurrent output. 2025-02-01 17:58:54 +01:00
Ryan Rotter
ba67ccfc6e
tap command: correct helptext for --repair 2025-02-01 00:45:16 -05:00
Mike McQuaid
7ff99e2353
Use ~ instead of ${HOME}
Partial revert of Homebrew/brew#19153
See https://github.com/Homebrew/brew/pull/19153#discussion_r1930678587
2025-01-27 15:19:59 +00: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
Issy Long
4c9de7d31c
Merge pull request #19084 from Homebrew/add-comments-to-rubocop-disables
Add clarifying comments to `rubocop:disable`s
2025-01-13 11:32:31 +00:00
Mike McQuaid
730c93e60f
Merge pull request #19087 from Homebrew/installed_on_request_true
Fix usage of `Tab#installed_(on_request|as_dependency)`
2025-01-13 09:36:05 +00:00
Mike McQuaid
0940fb78dc
Fix usage of Tab#installed_(on_request|as_dependency)
These can return `true`, `false` or `nil` so adjust the signature to
note this and fix the call sites to ensure we don't accidentally pass
through `nil` values when we shouldn't.

While we're here, make a `TODO` to fix this bad API up in future.

Fixes https://github.com/Homebrew/brew/issues/19076
2025-01-13 09:24:42 +00:00
Adrian Ho
85c9551cd3 update.sh: reject unknown long opts
I accidentally typed `brew update --greedy` instead of `brew upgrade --greedy` and got some strange output.

This fix causes unrecognized long options to throw a usage message and exit like all the other subcommands.

Before:
```
% brew update --greedy
==> Updating Homebrew...
Usage: brew update-report [--auto-update] [--force]

The Ruby implementation of brew update. Never called manually.
[...]
```

After:
```
% brew update --greedy
Error: Unrecognized option '--greedy'
Usage: brew update, up [options]

Fetch the newest version of Homebrew and all formulae from GitHub using git(1)
and perform any necessary migrations.
[...]
```
2025-01-13 09:41:09 +08:00
Douglas Eichelberger
0add431e69 Apply manual violation fixes 2025-01-12 10:06:00 -08:00
Douglas Eichelberger
dbb731bce2 brew style --fix 2025-01-12 10:05:21 -08:00
Issy Long
6ada9a9665
Add clarifying comments to rubocop:disables
- Needed for PR 18842 that adds a `DisableComment` RuboCop to ensure that all RuboCop disables have comments.
2025-01-12 16:59:07 +00:00
Mike McQuaid
c60efd943b
cmd/uses: improve flag description. 2024-12-30 12:43:20 +00:00