5321 Commits

Author SHA1 Message Date
Mike McQuaid
21dd3c263f
Merge pull request #16975 from Homebrew/ported-cmds
Begin porting non-dev commands to use AbstractCommand
2024-03-31 19:28:30 +01:00
Douglas Eichelberger
7f78fed676 rm unnecessary description 2024-03-30 16:50:28 -07:00
Douglas Eichelberger
65f8420232 Make things private 2024-03-30 16:43:11 -07:00
Douglas Eichelberger
22bfd9b230 Port Homebrew::Cmd::Link 2024-03-30 16:24:11 -07:00
Douglas Eichelberger
8ab9d2cbad Port Homebrew::Cmd::Leaves 2024-03-30 16:16:52 -07:00
Douglas Eichelberger
0fd082a1ff Port Homebrew::Cmd::InstallCmd 2024-03-30 09:36:47 -07:00
Ryan Rotter
d856d88c17 tap-info cmd: skip untapped core taps
When homebrew/core or homebrew/cask are untapped `brew tap-info` fails because
Tap.each includes them and tap.private? fails without a git repo interrogate.

This restores the behavior of `brew tap-info` before #16710
2024-03-30 01:41:31 -04:00
Douglas Eichelberger
d25956668d Fix tests 2024-03-29 19:12:25 -07:00
Douglas Eichelberger
d6a6742a4d Port Homebrew::Cmd::Info 2024-03-29 18:54:12 -07:00
Douglas Eichelberger
74218c0483 Port Homebrew::Cmd::Home 2024-03-29 18:53:08 -07:00
Douglas Eichelberger
d0c1af4f9e Port Homebrew::Cmd::Help 2024-03-29 18:53:08 -07:00
Douglas Eichelberger
78b259c8c6 Port Homebrew::Cmd::GistLogs 2024-03-29 18:53:08 -07:00
Douglas Eichelberger
90cd9d2e0a Port Homebrew::Cmd::FetchCmd 2024-03-29 18:53:08 -07:00
Douglas Eichelberger
f83ba58f8d Port Homebrew::Cmd::Doctor 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
67fd065e1d Port Homebrew::Cmd::Docs 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
bde44cfc99 Port Homebrew::Cmd::Developer 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
1fc4a93ca1 Port Homebrew::Cmd::Desc 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
84222ec006 Port Homebrew::Cmd::Deps 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
3615e5e648 Port Homebrew::Cmd::Config 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
b97f9b22e2 Port Homebrew::Cmd::CompletionsCmd 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
02e2772e9d Port Homebrew::Cmd::CommandsCmd 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
adf47bb11b Port Homebrew::Cmd::Cleanup 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
a8f8c65d93 Port Homebrew::Cmd::Autoremove 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
c50fb2dbd2 Remove redundant cli/parser requires 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
3cedf33150 Port Homebrew::Cmd::Analytics 2024-03-29 18:53:07 -07:00
Bo Anderson
dd382487c7
Sort kegs based on version scheme 2024-03-29 23:33:41 +00:00
Bo Anderson
2f05b47242
Fix setup-ruby/rubocop issues when euid != uid 2024-03-28 15:39:07 +00:00
Douglas Eichelberger
aad08cd5a4 Revert using hash accessors for args 2024-03-15 12:51:03 -07:00
Douglas Eichelberger
7c7444c2a5 No longer need to thread args 2024-03-15 12:46:06 -07:00
Douglas Eichelberger
96fc8bf66b bracket access over public_send 2024-03-15 12:46:05 -07:00
Douglas Eichelberger
fd652148fa Implement cmd_args block 2024-03-15 12:46:05 -07:00
Douglas Eichelberger
cbcb221de6 Create AbstractCommand class 2024-03-15 12:46:05 -07:00
Mike McQuaid
b1cbe47e45
cmd/update-reset: use stable tag.
Currently we always reset Homebrew/brew onto the latest `master`.
Instead, let's correctly use the latest tag when appropriate.
2024-03-14 16:41:30 +00:00
Kevin
7473e63f38
Merge pull request #16875 from Homebrew/fix-untap-cmd-bugs
Fix untap cmd bugs
2024-03-13 20:17:38 -07:00
Mike McQuaid
b1990ed4b6
Merge pull request #16863 from apainintheneck/memoize-installed-tap-loading-v2
Memoize installed tap loading v2
2024-03-12 08:36:09 +00:00
apainintheneck
ff495a2e44 untap: add new module to make these refactored methods easier to test 2024-03-10 22:33:33 -07:00
apainintheneck
46a32f90c4 cmd/untap: refactor logic into methods to facilitate testing 2024-03-10 22:33:33 -07:00
apainintheneck
819af3cbdd cmd/untap: fix installed formula & cask check
This wasn't working before for a few reasons.

1. It never got past the installed name check because the
installed name sets had short names and the tap names were
long names including the tap namespace too. Now we just trim the
long name before comparing it to the installed name set.

Before:

```
["name"].include?("tap/full/name") # always false
```

After:

```
["name"].include("tap/full/name".split("/").last) # sometimes true
```

2. The names we were trying to load formulae and casks with
were incorrect.

Before:

```
tap = Tap.fetch("homebrew/cask-versions")
token = "homebrew/cask-versions/token"

cask = Cask::CaskLoader.load("#{tap}/#{token}")
```

After:

```
token = "homebrew/cask-versions/token"
cask = CaskCaskLoader.load(token)
```
2024-03-10 22:33:33 -07:00
apainintheneck
fb8c0d2b30 s/Tap.select(&:installed?)/Tap.installed/ 2024-03-08 23:22:00 -08:00
Mike McQuaid
9ac31827a0
Various brew update behaviour improvements
- Output a message every time auto-update is run rather than a 3 second
  timer. This makes it more obvious that Homebrew isn't just sitting
  doing nothing for 2.9 seconds.
- Output a message when running `brew update` so Homebrew doesn't just
  sit there silently doing nothing.
- Update all taps when `brew update` is run, not just those hosted on
  GitHub. This makes it more obvious that people don't need to explictly
  run `brew update` "just in case".
- As a result of this, remove `brew tap --force-auto-update` as it's no
  longer necessary.
2024-03-08 16:21:09 +00:00
Mike McQuaid
f1f92d28bf
Merge branch 'master' into lail/add-overwrite-flag-to-brew-upgrade 2024-03-08 08:27:04 +00:00
Bob
3d24da1904 Add support for the --overwrite flag to brew upgrade to govern the keg-linking step
`FormulaInstaller` already supports this (https://github.com/Homebrew/brew/pull/12691) but I didn't wire it up via `brew upgrade` and the two can be used largely interchangeably
2024-03-07 13:13:28 -08:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Douglas Eichelberger
fe439e8320 Apply 'chmod -x' to executables without shebangs 2024-03-06 22:22:49 -08:00
Markus Reiter
3da0f8c4a6
Fix loading casks/formulae from relative paths. 2024-03-01 04:05:15 +01:00
Patrick Linnane
faf399716f
Fix Style/RedundantLineContinuation offenses
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-02-29 09:26:51 -08:00
Markus Reiter
e08e873921
Only show installed taps in brew tap output. 2024-02-28 20:18:55 +01:00
Markus Reiter
18571e8991
Merge pull request #16732 from reitermarkus/repo-var-suffix
Rename `Tap#repo_var` to `Tap#repo_var_suffix`.
2024-02-27 11:26:16 +01:00
Issy Long
f4218a6316
Fix RuboCop Performance/MapCompact offenses
- Rename an iterator variable since it would make the line too long.
2024-02-25 22:59:59 +00:00
Markus Reiter
b29a2cdff3
Add missing local variable.
Co-authored-by: Bo Anderson <mail@boanderson.me>
2024-02-23 17:09:42 +01:00