4632 Commits

Author SHA1 Message Date
Mike McQuaid
ba8e40f249
Merge pull request #14286 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.41.1
build(deps): bump rubocop from 1.40.0 to 1.41.1 in /Library/Homebrew
2022-12-27 21:20:03 +00:00
Mike McQuaid
b2173e6542
Merge pull request #14259 from cho-m/items-find-devnull
items.sh: return early when no Taps directory
2022-12-27 21:09:29 +00:00
Nanda H Krishna
fe0eb9b5b0
Fix style issues 2022-12-22 23:52:26 -05:00
Michael Cho
a0e9352ad2
cmd/formulae.sh: read cached JSON when using API 2022-12-19 19:41:48 -08:00
apainintheneck
47b3f6fe6e Stop including/extending search.rb
- Instead use class methods.
- This is better than use it as a mixin
  when only a small number of methods are
  used in each class or module.
- It also allows us to conditionally
  require it in `brew install`.
- Removed unused search require in descriptions.rb.
2022-12-17 11:08:13 -08:00
apainintheneck
0ae416d0ee Refactor Search#search_descriptions
- Move cask logic back into method from extend/os and check
  whether to display it based on args since formula?
  is passed by default on Linux now
- Use #search_descriptions in `brew desc` instead of
  duplicating logic
- Remove need for extend/os/search
2022-12-17 10:03:41 -08:00
apainintheneck
cb64bc4df3 Move pkg type logic into search_name
Now the search_name method takes the command line
args and only returns package types that line up
with those args.

That means it will only return casks if casks are valid
and same with formulae.
2022-12-13 22:50:00 -08:00
Kevin
0afc41ceef
Explain edge case in install/cmd
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-12-13 20:31:33 -08:00
apainintheneck
daa87fa10f Add specific examples to install cmd
- provide specific install instructions
  when a cask/formula doesn't exist
  and we search for similar ones
- print and exit early if a named formula that
  was removed recently has the same name
- exit early if the tap is specified because
  we don't get good search results
2022-12-12 21:04:59 -08:00
apainintheneck
a481729ade Show casks in install not found output
- Move `search_names` and `print_missing_formula_help` out of `cmd/search.rb` to `search.rb`
- Change to using those functions in `cmd/install.rb` when a formula or cask doesn't exist
2022-12-10 13:02:38 -08:00
Mike McQuaid
28719f7fdc
cmd/desc: fix searching.
Ensure that the cache store is populated if we pass `--eval-all`.
2022-12-06 13:56:54 +00:00
apainintheneck
00990e34a7 Merge branch 'master' into create-cop-for-os-checks 2022-11-29 23:14:15 -08:00
apainintheneck
c477b9aab3 Cleanup after adding os specific rubocop
- Change name of rubocop warning
- Disable linting on remaining offending lines
- Add todos to move lines with disabled linting
  checks to extend/os in the future
2022-11-29 23:13:50 -08:00
Ian Gregory
9013ca2a22 Prevent brew casks from finding formulae at tap root 2022-11-20 16:22:18 -05:00
Mike McQuaid
8145d516e2
cmd/search: better handle non-TTY output.
When `stdout` is not a TTY then using `ohai` is a bit unpleasant as it
prevents using pipes to do cool things with the output.
2022-11-01 13:51:13 +00:00
Ian Gregory
a0f915169c Remove --adopt switch from reinstall and upgrade 2022-10-25 19:07:21 -04:00
Ian Gregory
a715dec49d Add --adopt switch
Allows `brew install` & co. to adopt existing cask artifacts that are
identical to those being installed.

Discussion: #14006
2022-10-21 23:28:51 -04:00
Mike McQuaid
34979a33d3
Merge pull request #13997 from hyuraku/add-error-log-for-download-formula.json
add error log of download `formula.json`
2022-10-14 17:35:45 +01:00
Mike McQuaid
e554f51454
cmd/update: tweak error message.
Co-authored-by: Bo Anderson <mail@boanderson.me>
2022-10-14 17:10:50 +01:00
hyuraku
4bc5f48654 compare bytesize instead of shasum256 2022-10-15 00:22:10 +09:00
hyuraku
dc37364248 use ruby script instead of shasum command 2022-10-13 23:46:41 +09:00
hyuraku
f4156378d8 compare formula.json shasum to check brew updated 2022-10-13 23:16:28 +09:00
hyuraku
8843364123 add error log of download formula.json 2022-10-12 22:35:08 +09:00
Bo Anderson
bde685aae2
Merge pull request #13982 from Bo98/ruby3-part1
Preliminary compatibility fixes for Ruby 3
2022-10-11 19:42:57 +01:00
Rylan Polster
174087958b
Simulate all OS/arch combinations in brew readall 2022-10-10 23:56:37 -04:00
Bo Anderson
9b99594753
Preliminary compatibility fixes for Ruby 3 2022-10-11 02:53:27 +01:00
Adrian Ho
5155c9073b update*: enforce sane symlinks setting
Otherwise, a global `core.symlinks = false` setting, likely in a WSL context, breaks Aliases and any other places that use symlinks.

Also enforce consistency in `git config` settings across instances.

Ref: https://github.com/Homebrew/homebrew-core/issues/112539
2022-10-08 22:03:37 +08:00
Mike McQuaid
9c0708f2b5
Merge branch 'master' into add-dry-run-option-to-brew-install 2022-10-03 10:10:58 +01:00
Adrian Ho
75c5769e75 shellenv: add explanatory MANPATH comment
Resolves #13867 and (hopefully) future attempts to correct the intended functionality.
2022-09-15 23:00:34 +08:00
Mike McQuaid
1b3f5980be
Merge pull request #13839 from apainintheneck/no-autoremove-build-deps-when-built-from-src
autoremove: ignore build deps when built from src
2022-09-14 13:10:14 +01:00
Mike McQuaid
c7bd51b995
Merge pull request #13844 from troymccabe/feature/13834-brew-docs-cmd
Adds `brew docs` to close #13834
2022-09-12 14:54:29 +01:00
Mike McQuaid
dbb9af49e7
Update Library/Homebrew/cmd/docs.rb
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2022-09-12 14:25:34 +01:00
Mike McQuaid
572a42ccd0
cmd/docs: tweak description. 2022-09-12 14:12:50 +01:00
Troy McCabe
ac9a96874e Adds brew docs to close #13834 2022-09-11 22:10:37 -05:00
apainintheneck
ae17d3cffd autoremove: ignore build deps when built from src
Now the build dependencies of formula that were installed from
source will not be removed by `brew autoremove`. This is especially
helpful for those who've installed brew in an alternative prefix.
2022-09-09 21:54:32 -07:00
Carlo Cabrera
708935d2c8
cmd/fetch: rename fetch_failed to fetch_tries.
This makes the code substantially easier to understand. Follow-up to #13807.
2022-09-06 18:35:34 +08:00
Carlo Cabrera
360052af57
cmd/fetch: --retry with exponential backoff.
See discussion at Homebrew/homebrew-test-bot#826.
2022-09-06 01:25:34 +08:00
Mike McQuaid
e2759fbdff
Deprecate reading all formulae through commands
We added the `--all` flag (now renamed to `--eval-all`) for various
commands for this behaviour so let's start deprecating this.

Also, introduce a `HOMEBREW_EVAL_ALL` environment variable to use the
existing, less secure, behaviour by default and avoid passing
`--eval-all` everywhere.
2022-09-05 13:57:22 +01:00
Rylan Polster
bfbb7a79bd
Improve brew update with HOMEBREW_INSTALL_FROM_API 2022-09-02 02:10:12 -04:00
EricFromCanada
197f915323
cmd/deps: drop --installed requirement for --formula/--cask
Fixes #13592.
2022-08-31 14:20:11 -04:00
Mike McQuaid
fd432aa1db
cmd/deps: improve switch names.
The previous `-n` and `--1` made both the code and the help harder to
read and follow.

Co-authored-by: Eric Knibbe <enk3@outlook.com>
Co-Authored-By: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2022-08-31 17:21:44 +01:00
Mike McQuaid
a5f7fc814e
cmd/deps: return failing exit code on circular dependencies.
This makes more sense but will also be useful in `brew test-bot`.
2022-08-30 12:21:02 +00:00
Kevin
6f196ad9ba
Merge pull request #13695 from apainintheneck/ls--without-cellar
Update `brew ls` to work when the cellar doesn't exist
2022-08-16 17:55:13 -07:00
hyuraku
634fcad1b2 add dry-run option to formula#install 2022-08-16 21:01:07 +09:00
hyuraku
93ebe42a72 add dry-run option to cask#install 2022-08-16 21:00:45 +09:00
Sean Molenaar
17d0572984
Merge pull request #13683 from SMillerDev/fix/build_env/dump_typing
build_environment: add proper types to dump() and fix inreplace error
2022-08-15 19:34:41 +02:00
Sean Molenaar
2de6958a36
build_environment: add proper types to dump() and fix inreplace error 2022-08-15 19:03:55 +02:00
fn ⌃ ⌥
a208ea9c92 info: highlight package name 2022-08-15 07:47:52 -07:00
apainintheneck
353fe2d322 Update brew ls to work when the cellar doesn't exist 2022-08-13 12:21:14 -07:00
Mike McQuaid
04ff6a18f4
Tweak --debug-symbols description. 2022-08-12 09:34:51 +01:00