5321 Commits

Author SHA1 Message Date
Carlo Cabrera
dde493c6e9
cmd/*-sync: avoid clobbering existing user installations
If a user already has an existing version installed, let's avoid
deleting it.
2024-04-26 18:32:54 +08:00
Mike McQuaid
966454c97d
Merge pull request #17125 from Homebrew/brew-list-manual-auto
cmd/list: support listing formulae installed on request or automatically
2024-04-23 09:10:37 +01:00
Ruoyu Zhong
ba85f92df2
cmd/list: update switches and logic 2024-04-23 15:55:06 +08:00
Ruoyu Zhong
7cf6cb2624
cmd/list: tweak wording 2024-04-23 15:51:16 +08:00
Ruoyu Zhong
a1a0cbbf0a
cmd/list: update description for --installed-as-dependency
Co-authored-by: Kevin <apainintheneck@gmail.com>
2024-04-23 15:41:11 +08:00
Mike McQuaid
2b09fcd6e4
cmd/list: more consistent switches. 2024-04-23 08:35:10 +01:00
Ruoyu Zhong
868c15fe4f
cmd/list: support listing formulae installed on request or automatically
Sample usage:

    $ brew ls --manual
    gcc
    llvm
    [...]
    $ brew ls --auto
    grpc
    protobuf
    [...]
    $ brew ls --manual --auto
    gcc: manual
    grpc: auto
    llvm: manual
    protobuf: auto
    [...]

Resolves #17117.
2024-04-22 12:00:22 +08:00
Michael Cho
77a16c2e15
cmd/deps: add --os and --arch
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-04-21 17:56:59 -04:00
Issy Long
69c31d275f
Only brew desc --search needs --eval-all
- It was suggested in https://github.com/Homebrew/brew/issues/ 16733 that
  `brew desc <formula_or_cask>` should work like `brew info <formula_or_cask>`
  and print the description of the package without needing `--eval-all`.
- Looking at the code, it seems like it's only searching that needs
  `--eval-all`, so limit the check to that.

Before:

```shell
$ brew desc hello
Error: `brew desc` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!
```

After:

```shell
$ brew desc hello
hello: Program providing model for GNU coding standards and practices

$ brew desc --search hello
Error: Invalid usage: `brew desc --search` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!

$ brew desc --search --eval-all hello
==> Formulae
dsh: Dancer's shell, or distributed shell
hello: Program providing model for GNU coding standards and practices
```
2024-04-17 23:54:45 +01:00
Will Faught
29c561eb59 Use newlines in package info 2024-04-12 09:52:37 -07:00
Will Faught
661f78e9c1
Update Library/Homebrew/cmd/tap-info.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2024-04-12 09:49:33 -07:00
Will Faught
4e7d128604 cmd, cask: info prints whether installed 2024-04-10 19:02:09 -07:00
Mike McQuaid
a21c71fa97
Merge pull request #17056 from Homebrew/fix_brew_log
cmd/log: various fixes.
2024-04-09 10:55:52 +01:00
Mike McQuaid
7bfe859473
cmd/log: various fixes.
- Don't pass through `args:` when called with no arguments; these don'T
  need to be passed and end up breaking things instead.
- Make `T.must` as early as possible.
- Add a type signature to `git_log` to enable `typed: strict` and catch
  these sorts of bugs earlier next time.
- `--follow` only works with a single file so check if the path is a
  file before adding it to the arguments.
2024-04-09 10:42:08 +01: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
Mike McQuaid
56fc9a1fb2
Merge pull request #17047 from Homebrew/block-params
Prefer numbered block params over proc conversion, cont'd
2024-04-08 19:13:01 +01:00
Douglas Eichelberger
c59d9fa833 Prefer numbered block params over proc conversion, cont'd 2024-04-08 09:47:27 -07:00
Mike McQuaid
5c48226018
cmd/help: add description and arguments.
This allows an accurate manpage description of `brew help`.

Also commit the various other required changes to completions and
manpage.
2024-04-08 13:35:25 +01:00
apainintheneck
2d47193d22 cmd/untap: move module methods back into the cmd
The extra module was their to facilitate testing but now that
everything is properly namespaced and each command is an instance
we can just move the methods into the command. Since it's an
instance now we don't need to be as careful about caching either.
2024-04-03 22:06:19 -07:00
Douglas Eichelberger
3f856f6516 Port Homebrew::Cmd::Repository 2024-04-01 16:02:41 -07:00
Douglas Eichelberger
6a1d43337c Port Homebrew::Cmd::Prefix 2024-04-01 16:00:47 -07:00
Douglas Eichelberger
b56e0b733d Port Homebrew::Cmd::Env 2024-04-01 15:58:07 -07:00
Douglas Eichelberger
754151fcb8 Port Homebrew::Cmd::Cellar 2024-04-01 15:56:06 -07:00
Douglas Eichelberger
102051c35d Port Homebrew::Cmd::Caskroom 2024-04-01 15:54:03 -07:00
Douglas Eichelberger
7bbf0a3206 Port Homebrew::Cmd::Cache 2024-04-01 15:53:56 -07:00
Douglas Eichelberger
fdc95d02c8 Port Homebrew::Cmd::Uses 2024-04-01 12:01:37 -07:00
Douglas Eichelberger
1362890f2a Port Homebrew::Cmd::Upgrade 2024-04-01 11:58:35 -07:00
Douglas Eichelberger
d5add6565c Port Homebrew::Cmd::UpdateReport 2024-04-01 11:58:20 -07:00
Douglas Eichelberger
48f4adad33 Port Homebrew::Cmd::Untap 2024-04-01 11:50:25 -07:00
Douglas Eichelberger
f8caae06f7 Port Homebrew::Cmd::Unpin 2024-04-01 11:48:40 -07:00
Douglas Eichelberger
5ccb0b0567 Port Homebrew::Cmd::Unlink 2024-04-01 11:47:18 -07:00
Douglas Eichelberger
4cf9ef831a Port Homebrew::Cmd::Uninstall 2024-04-01 11:46:01 -07:00
Douglas Eichelberger
841cfd9fdc Port Homebrew::Cmd::Tap 2024-04-01 11:43:52 -07:00
Douglas Eichelberger
be42d46d49 Port Homebrew::Cmd::TapInfo 2024-04-01 10:15:28 -07:00
Douglas Eichelberger
5495ff1eea Port Homebrew::Cmd::Search 2024-04-01 10:12:52 -07:00
Douglas Eichelberger
d875c970e9 Port Homebrew::Cmd::Reinstall 2024-04-01 10:09:48 -07:00
Douglas Eichelberger
057f561d2c Port Homebrew::Cmd::Readall 2024-04-01 10:05:02 -07:00
Douglas Eichelberger
5ef070380c Port Homebrew::Cmd::RbenvSync 2024-04-01 10:04:06 -07:00
Douglas Eichelberger
6c260db277 Port Homebrew::Cmd::PyenvSync 2024-04-01 10:01:54 -07:00
Douglas Eichelberger
427b527335 Port Homebrew::Cmd::Postinstall 2024-04-01 09:59:47 -07:00
Douglas Eichelberger
31aa89aa7c Port Homebrew::Cmd::PostgresqlUpgradeDatabase 2024-04-01 09:48:23 -07:00
Douglas Eichelberger
c1b1c11a8c Port Homebrew::Cmd::Pin 2024-04-01 09:44:14 -07:00
Douglas Eichelberger
7725fc62d4 Port Homebrew::Cmd::Outdated 2024-04-01 09:42:31 -07:00
Douglas Eichelberger
57442ab67e Port Homebrew::Cmd::Options 2024-04-01 09:15:58 -07:00
Douglas Eichelberger
c5dfac1f2c Port Homebrew::Cmd::NodenvSync 2024-04-01 09:15:58 -07:00
Douglas Eichelberger
a43224cb4a Port Homebrew::Cmd::Missing 2024-04-01 09:15:58 -07:00
Douglas Eichelberger
0cb608a80c Port Homebrew::Cmd::Migrate 2024-04-01 09:15:58 -07:00
Douglas Eichelberger
59adde2069 Port Homebrew::Cmd::Log 2024-04-01 09:15:58 -07:00
apainintheneck
db507be41a keg: update sorting by version logic
This updates logic to add a `#scheme_and_version` method to be used
with `.sort_by` and `.max_by`. Using `Keg#version` by itself can be
inaccurate when different version schemes are present. This also
updates the behavior of `Formula#eligible_kegs_for_cleanup` to match
the previous behavior. We were dropping the wrong keg based on the
sort being reversed in a previous PR.
2024-03-31 17:52:32 -07:00