4632 Commits

Author SHA1 Message Date
Mike McQuaid
7af68d0f8e
Fix shellcheck failures
A new version of `shellcheck` (I think?) brought us so new warnings and
errors.

To fix:
- pass `--source-path` so we don't need to stop `shellcheck` trying to
  read sourced files every time
- disable some more warnings/errors we don't care about fixing
2021-04-22 13:18:44 +01:00
Rylan Polster
0a30cae9d1
search: properly deprecate brew search --cask 2021-04-19 08:25:19 -04:00
Mike McQuaid
6f071a06f8
Use JSON.pretty_generate
It's dramatically more human readable for very little difference in
space.
2021-04-09 15:44:37 +01:00
Mike McQuaid
271474820f
Merge pull request #11075 from MikeMcQuaid/deprecate_disable_delete
Deprecate, disable, delete code for next major/minor version.
2021-04-09 10:09:51 +01:00
Mike McQuaid
d73351251c
Deprecate, disable, delete code for next major/minor version.
Do the usual dance for bumping our major/minor version.
2021-04-09 09:30:36 +01:00
Mike McQuaid
bf199cf271
Default Homebrew on Linux to use GitHub Packages. 2021-04-09 09:17:25 +01:00
Mike McQuaid
a2251a16ff
Default download to GitHub Packages
Now that all bottles (without existing `sha256` mismatches) have been
uploaded to GitHub Packages make it the default download location.

Will give this a few days testing before we make a tag and make this
default for everyone.

No migration has been done for Linuxbrew packages yet; those will be
done after we have fully migrated over Homebrew.
2021-04-08 11:33:03 +01:00
Mike McQuaid
f266acff2d
Merge pull request #11005 from MikeMcQuaid/github_packages_bottle_tab_clear_cache
Fix `brew fetch --force` for GitHub Packages bottle tab download.
2021-04-02 13:51:17 +01:00
Mike McQuaid
3e0f14083a
Merge pull request #10975 from hyuraku/update-report_add_how-to-check-the-outdated
update-report: add how to check the outdated
2021-04-02 13:13:11 +01:00
Mike McQuaid
262f964f9e
Fix brew fetch --force for GitHub Packages bottle tab download.
Have to implement some custom logic here as there's two resources rather
than one.
2021-04-02 12:44:07 +01:00
Mike McQuaid
5f707d13d8
cmd/update-report: tweak outdated language.
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2021-04-02 12:16:39 +01:00
Mike McQuaid
d578469a75
Merge pull request #10984 from MikeMcQuaid/portable_ruby_github_default
cmd/vendor-install: use GitHub for portable Ruby.
2021-04-02 09:43:47 +01:00
Mike McQuaid
d9032ff01a
Download and use tabs from GitHub Packages 2021-04-01 17:37:16 +01:00
Mike McQuaid
1012f98c00
cmd/vendor-install: use GitHub for portable Ruby.
Let's default to using GitHub for portable Ruby and fall back to Bintray
(because Bintray is going away).
2021-04-01 17:37:08 +01:00
hyuraku
89868087fd repair the message 2021-04-01 22:01:04 +09:00
hyuraku
4e4886ff42 update-report: add how to check the outdated 2021-04-01 00:00:49 +09:00
Carlo Cabrera
c65a392d47
Merge pull request #10945 from carlocab/ls-cask
cmd/list: always use `ls` when no named args are passed
2021-03-29 22:02:48 +01:00
Mike McQuaid
dcfd4c2beb
cmd/update-report: tweak syntax. 2021-03-28 02:20:56 +01:00
Darren Kavanagh
92a42381df
Add additional quiet check in update-report 2021-03-28 02:20:55 +01:00
Carlo Cabrera
a3a6af9d99
cmd/list: remove cask and ls flag conflicts 2021-03-27 01:20:21 +00:00
Carlo Cabrera
e966808ac6
cmd/list: always use ls when no named args are passed
This has the added benefit of making the indentation in the output of
`brew list` uniform between formulae and casks.

Follow-up to #10899. See, in particular,

    https://github.com/Homebrew/brew/pull/10899#discussion_r598659321
2021-03-27 01:20:20 +00:00
Carlo Cabrera
e1385b0754
Merge pull request #10899 from carlocab/ls-delineate
cmd/list: delineate formulae and casks
2021-03-25 17:52:41 +00:00
Bo Anderson
3bf38a10ee
cmd/upgrade: fix --dry-run
Fixes #10909.
2021-03-22 23:58:04 +00:00
Bo Anderson
ae2d0fb0f8
Fix Cask handling in brew deps and brew uses.
Fixes #10906.
2021-03-22 22:26:45 +00:00
Carlo Cabrera
4dccc2ef7f
cmd/list: list formulae only if one is installed
We need the `HOMEBREW_CELLAR.exist?` check to avoid errors in new
installations, which may not have a `Cellar` directory.
2021-03-22 17:15:56 +00:00
Bo Anderson
555e9365f9
Merge pull request #10904 from Bo98/check_build_flags
Remove FormulaInstaller.prevent_build_flags
2021-03-22 16:53:46 +00:00
Bo Anderson
32d532fb49
cmd/list: fix Cask listing 2021-03-22 16:21:02 +00:00
Bo Anderson
d14a0bb131
Remove FormulaInstaller.prevent_build_flags 2021-03-22 16:11:27 +00:00
Bo Anderson
25373a18cc
Merge pull request #10880 from Bo98/cli-stronger-types
Stricter handling of CLI args
2021-03-22 14:13:01 +00:00
Carlo Cabrera
a88d65acc7
cmd/list: list casks only if one is installed 2021-03-22 14:12:42 +00:00
Carlo Cabrera
8538970567
cmd/list: delineate formulae and casks
Listing everything without qualifying which is which is confusing for
some users.

Fixes #10897.
2021-03-22 13:13:04 +00:00
Mike McQuaid
5588b6750c
Merge pull request #10885 from dkav/quiet-update
Replace tab with spaces and align indent
2021-03-19 09:38:23 +00:00
Darren Kavanagh
40d09f59b6
Replace tab with spaces and align indent 2021-03-18 11:31:42 -07:00
Bo Anderson
8e98ce69f3
Stricter handling of CLI args 2021-03-18 16:41:57 +00:00
Bo Anderson
20ff68a425
Fix brew style. 2021-03-17 20:45:44 +00:00
Darren Kavanagh
b66b461811
Expand quiet checks in update and update-report 2021-03-13 10:08:06 -08:00
Mike McQuaid
dc1fdc9f8d
Speedup brew --version.
Port `brew --version` to Bash to speed it up.

While we're here:
- remove (now) unused `Tap` Git methods
- use `--quiet` instead of `-q` to be more verbose

Benchmarks:
```
$ hyperfine --min-runs=3 --warmup=2 "git checkout origin/master; brew --version" "git checkout speedup_brew_version; brew --version"
Benchmark #1: git checkout origin/master; brew --version
  Time (mean ± σ):      2.083 s ±  0.004 s    [User: 396.8 ms, System: 597.2 ms]
  Range (min … max):    2.080 s …  2.088 s    3 runs

Benchmark #2: git checkout speedup_brew_version; brew --version
  Time (mean ± σ):     847.9 ms ±  35.2 ms    [User: 100.0 ms, System: 247.9 ms]
  Range (min … max):   824.1 ms … 888.3 ms    3 runs

Summary
  'git checkout speedup_brew_version; brew --version' ran
    2.46 ± 0.10 times faster than 'git checkout origin/master; brew --version'
```
2021-03-04 12:59:42 +00:00
Mike McQuaid
ca47b47f77
Speedup brew --prefix <formula>
This case is _really_ slow even although it's something we encourage
people to run often and build systems often do. The `brew --prefix`
case is really fast because it's just in Bash so: let's pull the
`brew --prefix <formula>` case into Bash too.

This doesn't handle any edge-cases like `--installed` and the formula
detection is pretty simple.

Also, to make this behaviour consistent, never output `Cellar` paths
from the (Ruby) `brew --prefix`; we never want people relying on the
Cellar paths anyway, only output them if the formula wasn't installed
(where, arguably, using a Cellar path is even worse) and the speedup is
worth this deviation in behaviour.
2021-02-25 17:07:28 +00:00
Jonathan Chang
538b6d1a52
Merge pull request #10678 from jonchang/fix-cask-info
cmd/info: fix `brew info --cask` on Linux
2021-02-24 14:06:40 +11:00
Seeker
880a82d21a
uninstall: delete references to unused --binaries flag 2021-02-22 19:48:43 -08:00
Jonathan Chang
90db84242f cmd/info: fix brew info --cask on Linux
We should be able to provide info on casks even if installing
casks isn't supported on Linux.
2021-02-23 13:42:38 +11:00
Dustin Rodrigues
81e3aa899d
update-report: use appropriate pronoun in update message 2021-02-19 11:58:01 -05:00
nandahkrishna
f7c8810214
utils/github/api: remove 'api' from method names 2021-02-17 23:47:05 +05:30
nandahkrishna
56e0c3d9e8
Update GitHub API usage 2021-02-15 22:38:27 +05:30
nandahkrishna
8e5451df2f
style: use parentheses for assignment in conditions 2021-02-12 18:33:37 +05:30
Mike McQuaid
f9b4b69f27
Merge pull request #10575 from nandahkrishna/dependent-cask-check
cmd/uninstall: check for dependent casks
2021-02-12 10:55:38 +00:00
Bo Anderson
0e732d3917 cmd/update-report: report outdated count & suggest brew upgrade 2021-02-10 15:36:38 +00:00
nandahkrishna
7965ad6160
cmd/uninstall: check for dependent casks 2021-02-09 08:47:11 +05:30
Mike McQuaid
72cb6ffd12
utils: import {ohai,puts}_stdout_or_stderr
Fixes #10536
2021-02-05 15:03:31 +00:00
Mike McQuaid
e98a913783
Merge pull request #10501 from MikeMcQuaid/update-stderr
cmd/update-report: output to stderr when not a TTY.
2021-02-05 12:15:30 +00:00