3122 Commits

Author SHA1 Message Date
Mike McQuaid
ed9942fbd1 Merge pull request #2769 from MikeMcQuaid/rubocop-no-perl-backrefs
rubocop: don’t allow Perl regex backrefs.
2017-06-12 16:47:28 +01:00
Mike McQuaid
021cef4b2b Autocorrect Rubocop Style/SpecialGlobalVars. 2017-06-12 09:11:42 +01:00
Mike McQuaid
7a0aff1080 Autocorrect Rubocop Style/PerlBackrefs. 2017-06-10 20:23:20 +03:00
Mike McQuaid
18fb81906e reinstall: keg.rmtree isn't a method. 2017-06-08 16:24:55 +03:00
Mike McQuaid
838bb38b3e reinstall: remove partially installed keg.
Previously if a `brew reinstall` was Ctrl-Cd after some files had been
installed it wouldn't try to remove the partially installed keg and the
renaming of the backed-up keg would fail. Alternatively, remove the
partially installed keg as if it has been Ctrl-Cd or otherwise failed
then it's not desirable to keep it.
2017-06-07 15:58:13 +01:00
Bob W. Hogg
51e83cdf91 cmd/reinstall: Fix reinstallation of formulae without bottles
Reinstallation of non-bottled formulae was failing because it
used a deprecated method.

Signed-off-by: Bob W. Hogg <rwhogg@linux.com>
2017-06-05 18:35:43 -07:00
Mike McQuaid
54e01d76db Merge pull request #2599 from peternewman/patch-1
Fix internal links on the manpage
2017-06-04 11:52:13 +01:00
Mike McQuaid
9e17e44b3e Change manpage internal links in correct location. 2017-06-04 11:12:56 +01:00
Markus Reiter
7c0a3a1233 Fix rubocop in brew audit. 2017-06-03 23:50:31 +02:00
Mike McQuaid
34670f9b22 Merge pull request #2720 from MikeMcQuaid/install-cask-env-filtering
install: fix cask install with env filtering.
2017-06-03 10:00:27 +01:00
Markus Reiter
8d514ae8f0 Merge pull request #2716 from reitermarkus/re-revert
Re-revert "Fix operator spacing."
2017-06-03 00:49:06 +02:00
Mike McQuaid
8d2794212f search: don’t exclude Caskroom results even if tapped.
As they are not shown in the normal `brew search` output.
2017-06-02 22:19:04 +01:00
Mike McQuaid
5dc11c6b93 install: fix cask install with env filtering.
With `HOMEBREW_ENV_FILTERING` simply running `brew` is not sufficient
to find `brew cask` so the full path needs to be passed.
2017-06-02 22:17:18 +01:00
Markus Reiter
2d6ae61314 Re-revert "Fix operator spacing." 2017-06-02 19:22:05 +02:00
ilovezfs
197392b56d Revert "Fix operator spacing." 2017-06-01 04:06:40 -07:00
Markus Reiter
d34ba7395b Fix operator spacing. 2017-05-31 19:53:41 +02:00
Misty De Meo
587f338daa
vendor-install: use Ruby as a sha256 fallback
But still prefer shasum/sha256sum where present.
2017-05-30 18:48:55 -07:00
Mike McQuaid
7a38bab333 Fixup all RuboCop warnings. 2017-05-29 18:43:18 +01:00
Mike McQuaid
4356016b4a Use parallel RuboCop
This requires updating to Rubocop 0.49.0 which will require some fixes
to rules, in Homebrew/brew and Homebrew/homebrew-core but opening this
for now so I remember.
2017-05-29 18:42:02 +01:00
Markus Reiter
d700a5ba18 Use Formatter::pluralize where possible. 2017-05-29 17:50:13 +02:00
Mike McQuaid
c2cb2c7868 Merge pull request #2682 from MikeMcQuaid/improve-installed-messaging
Improve some `brew install` messaging.
2017-05-29 09:15:15 +01:00
Markus Reiter
54c4580871 Use XDG_CACHE_HOME for RuboCop. 2017-05-29 01:31:38 +02:00
Mike McQuaid
ef59a751f4 Improve some brew install messaging.
Improve the messaging around `brew install` when there's a possible user
action such as an `upgrade` or `link` and don't tell people to
`install --force` when it's unnecessary.

While I did this, tweak the output and function usage in a couple of
related places.

Some example output before this change:
```
Warning: openssl is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: mysql@5.6 is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: analog-6.0_1 already installed
Warning: bash-completion@2-2.5 already installed, it's just not linked.
```

Some example output after this change:
```
Error: openssl 1.0.2k is already installed
To upgrade to 1.0.2l, run `brew upgrade openssl`
Warning: mysql@5.6 5.6.36_1 is already installed
Warning: analog 6.0_1 is already installed
Warning: bash-completion@2 2.5 is already installed, it's just not linked.
You can use `brew link bash-completion@2` to link this version.
```
2017-05-27 10:15:37 +01:00
Misty De Meo
6453c81dac
vendor-install: fix array syntax for old bash 2017-05-23 18:39:35 -07:00
Misty De Meo
b8fee7fe4d
vendor-install: check -x on output of which
This works around older versions of `which`, which return a
string on failure.
2017-05-23 18:36:25 -07:00
Markus Reiter
df1864ee43 Add CLI::Options DSL. 2017-05-22 02:51:17 +02:00
Markus Reiter
f0dc1d96c5 Merge pull request #2537 from reitermarkus/pathname-to_str
Remove `to_s` from some `Pathname`s.
2017-05-18 09:39:07 +02:00
Mike McQuaid
2b726383f1 info: fix conflicts formatting. 2017-05-16 10:05:05 +01:00
Mike McQuaid
aeaf9af711 Merge pull request #2470 from johnhawkinson/conflicts-info
Display formula conflict reasons
2017-05-16 08:45:45 +01:00
Mike McQuaid
8e2198ff01 info: tweak conflicts output code. 2017-05-15 10:40:07 +01:00
John Hawkinson
33d4c95a28 info: use more string interpolation 2017-05-14 15:09:01 -04:00
Markus Reiter
5828eefd01 Remove to_s from some Pathnames. 2017-05-08 13:37:28 +02:00
Mike McQuaid
57db2e539e Revert "Merge pull request #2597 from MikeMcQuaid/vendor-gems"
This reverts commit 3e4547f52e7ebec633f8bfefc8a396d944edf908, reversing
changes made to 6edf9382bcc1240ad6f97c8b752cfe56cef9965d.
2017-05-07 17:28:39 +01:00
Mike McQuaid
ee253e465b Vendor all Homebrew's gems.
Homebrew's actually ended up using a fair few gems. While we want to
avoid Bundler at runtime (and this PR still does that, in fact uses
Bundler even less at runtime than it did before) writing our own version
to use at build-time seems redundant.
2017-05-07 13:52:57 +01:00
Mike McQuaid
6a15cea0b4 style: fix audit --online
This passed a symbol to `:except_cops` which caused a 💥.
2017-05-03 12:58:08 +01:00
Mike McQuaid
1c43070e69 style: don't require rubocop until installed.
This avoids an error when RuboCop installed installed yet.

CC @GauthamGoli FYI.
2017-05-03 12:09:18 +01:00
Mike McQuaid
555505ec54 Merge pull request #2531 from GauthamGoli/audit_cops_options_refactor
audit: Allow skipping/selective running of cops and cops refactor
2017-05-03 11:28:25 +01:00
Gautham Goli
fed668b330 Add --only-cops,--except-cops options for brew style and simplify cop names 2017-05-03 14:49:23 +05:30
Mike McQuaid
f951a22bea Install etc/var files on postinstall.
Also, don't delete them after that. This means that `brew postinstall`
becomes a way to easily reinstall configuration files for any formula
without needing any changes to any bottles or requiring a reinstall.
2017-05-03 09:00:17 +01:00
Gautham Goli
c3330c289d Add --only-cops,--except-cops options for brew audit
Also refactor audit cops into two "departments"
 - FormulaAudit
 - FormulaAuditStrict
2017-05-02 23:26:12 +05:30
Gautham Goli
a4568a8697 Let cops run without --strict flag 2017-05-02 23:14:44 +05:30
Markus Reiter
22f624b373 Make PATH enumerable. 2017-04-30 21:11:28 +02:00
Markus Reiter
f8ad9d7efd Use PATH where possible. 2017-04-30 21:11:27 +02:00
Markus Reiter
2bda194bd9 Add GitHub::search_code method. 2017-04-25 12:29:01 +02:00
Mike McQuaid
228239af31 Allow forcing Homebrew GitHub organisation.
On Linux this defaults to Linuxbrew but in some cases (i.e. a Linux
machine performing uploads for Homebrew) we want to allow this to be
overridden back to the defaults.

Relies on a change incoming to `brew test-bot` to set this there.
2017-04-25 09:13:36 +01:00
Mike McQuaid
b3c69aba87 search: use single HTTP call for tap searches.
Use GitHub's code search API to search using the filename based on the
search query. This means we only need a single HTTP call and no more
multithreading madness. This also means we're able to search everything
in the Homebrew and Caskroom organisation by default without having to
maintain a list of things to search (and not) in here.
2017-04-24 14:11:04 +01:00
Mike McQuaid
ba3c46d24f More deprecations.
Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
2017-04-22 16:28:07 +01:00
Markus Reiter
6ce84c4fb8 Add OFFICIAL_CASK_TAPS in official_taps.rb. 2017-04-20 05:22:34 +02:00
Markus Reiter
3c017a7405 Lowercase Caskroom in search. 2017-04-20 05:22:34 +02:00
Mike McQuaid
1330b74416 install: don't search when formula is unreadable.
These formulae are detected as missing but exist in an unreadable form.

Fixes #2485
2017-04-18 08:43:39 +01:00