315 Commits

Author SHA1 Message Date
Mike McQuaid
b8647778ee Merge remote-tracking branch 'origin/master' into HEAD 2016-11-06 17:58:24 +00:00
Mike McQuaid
262eaca56e diagnostic: add build error checks. 2016-11-05 10:58:39 -04:00
Mike McQuaid
b38f5b3e7d diagnostic: only make minimum Xcode/CLT version checks fatal.
Also: freeze the relevant arrays.
2016-11-05 10:58:39 -04:00
Josh Hagins
b35134239a diagnostics: whitelist dylib installed by SentinelOne 2016-11-04 12:18:23 -04:00
James Young
f46e0032bf Add static libs and dylibs commonly put in /usr/local/lib by Symantec Endpoint Protection to the brew doctor white lists 2016-11-04 14:35:54 +00:00
Alyssa Ross
0cd983487c missing_deps: extract formula instance method 2016-10-25 22:34:35 +01:00
Alyssa Ross
c88b67f3a8 missing: simplify code a bit 2016-10-25 22:34:35 +01:00
ilovezfs
7fa4ffe3dc missing: allow hiding specified formulae 2016-10-25 22:34:35 +01:00
Paolo G. Giarrusso
aa8242bb66 brew doctor: warn about SSL_CERT_FILE (#1284)
Multiple issues have been filed about this environment variable, hence
give a warning. #932 might make this unnecessary when merged, but
hopefully this warning can be merged quickly.
2016-10-13 17:58:29 +02:00
Mike McQuaid
21ff82be7f diagnostic: handle HOMEBREW_TEMP mktmpdir failure.
Fixes #1223.
2016-10-09 14:33:04 +01:00
Markus Reiter
ddf5583208 Refactor Cask’s extensions. 2016-10-04 15:43:58 +02:00
Mike McQuaid
8a57fee68c */diagnostic: tweak messaging.
Update some messaging based on recent user confusion and the
`/usr/local/Homebrew` and Ruby 2 migrations.
2016-10-02 17:30:08 +01:00
Markus Reiter
884b268506 Use Formatter for all URLs. 2016-10-01 20:00:49 +02:00
Mike McQuaid
2405c3e205 doctor: remove outdated Homebrew check.
This is no longer relevant in the bright, new tagged future.

Fixes #1151.
2016-09-26 12:13:18 +01:00
Markus Reiter
b5f8de8bf4 Fix Style/RegexpLiteral. 2016-09-23 15:30:07 +02:00
Markus Reiter
0406f918a6 Fix Style/SingleLineBlockParams. 2016-09-23 15:30:07 +02:00
Markus Reiter
4064084c58 Fix Style/MethodName. 2016-09-23 15:30:06 +02:00
Markus Reiter
0581dda187 Auto-correct guard clauses. 2016-09-23 15:30:05 +02:00
Mike McQuaid
3f9cce0a03 Use new "macOS" naming where appropriate.
Not quite a mass replacement as I've used OS X and Mac OS X where
describing specific older versions and added compatibility methods
for things in the DSL.
2016-09-18 19:57:19 +01:00
Mike McQuaid
1bdbb0f462 Improve rescue nesting. 2016-09-17 17:01:04 +01:00
Mike McQuaid
6693915399 rubocop --auto-correct all remaining files.
But remove some manual `.freeze`s on constants that shouldn't be
constants.
2016-09-17 16:14:13 +01:00
Mike McQuaid
1c5fa19f84 Merge pull request #966 from MikeMcQuaid/keg-lock-constants
Use constants for LinkedKegs/PinnedKegs/Locks.
2016-09-15 18:57:04 +01:00
Mike McQuaid
72d10fff0b Use constants for LinkedKegs/PinnedKegs/Locks.
These definitions are scattered throughout the codebase which makes it
hard to refactor them later (my goal is to move them outside of
HOMEBREW_LIBRARY). Unify their definitions for clearer code and easier
movement later.
2016-09-15 18:28:42 +01:00
Mike McQuaid
842d6ce8bd keg: add ALL_TOP_LEVEL_DIRECTORIES constant.
This is used in diagnostic (and will be used in other places later)
rather than hard-coding other directories later.
2016-09-15 09:20:39 +01:00
Mike McQuaid
30fd4f3fe5 diagnostic: remove duplicate checks. 2016-09-09 13:08:02 +01:00
Mike McQuaid
492391f5fe Don't require/recommend ownership of /usr/local.
Apple reset this on every OS X major (and some minor) updates and it
always proves a painful and unnecessary step. Instead just check the
directories we actually care about are writable.

This may mean if these directories do not already exist (although they
are now created by the installed) that `brew link` will fail and require
manual intervention but this seems to be superior for both new and the
majority of existing users.
2016-09-09 08:06:37 +01:00
Mike McQuaid
d1ba4f44c0 Merge pull request #833 from DomT4/death_by_xcode
xcode: die unless Xcode/CLT up-to-date on prerelease macOS
2016-09-07 09:51:06 +01:00
Mike McQuaid
f1cc1265af Refactor MacOS check_development_tools usage.
Better use the abstraction layer so e.g. Linux could have similarly
fatal checks for these things.
2016-09-07 09:11:06 +01:00
Mike McQuaid
dfcbefff73 Merge pull request #201 from gregory-nisbet/feature-env-shells
--env: support more shells, allow explicit shell selection
2016-09-04 21:23:33 +01:00
Mike McQuaid
2691cf1b8b diagnostic: tweak /usr/local messaging.
Highlight that the main reason for preferring /usr/local is because of
bottles. There's been some confusion around this e.g.
https://github.com/Homebrew/homebrew-core/issues/3968
2016-08-25 15:29:43 +01:00
Mike McQuaid
74cdfe491f Revert "diagnostic: ignore duplicated brew-cask commands" 2016-08-22 10:28:03 +01:00
Mike McQuaid
ff8d22f3b3 diagnostic: ignore duplicated brew-cask commands
These are intentionally duplicated for now until the Cask migration is
complete.
2016-08-19 14:14:18 +01:00
Mike McQuaid
739881b482 diagnostic: don't barf if HEAD is also a file.
Closes #694.
2016-08-16 14:31:50 +01:00
Greg Nisbet
bf63c08d50 tests for shell-specific diagnostic message 2016-08-10 23:21:30 -07:00
Greg Nisbet
f0cc815d86 Multi-shell diagnostic check 2016-08-10 23:21:30 -07:00
Greg Nisbet
9a29a306cf resolve conflict in diagnostic.rb 2016-08-10 23:19:09 -07:00
Dominyk Tiller
fdcdcf7350 diagnostic: remove MacGPG2 check
This hasn't been an issue for upstream stable releases for 3 years, since March
2013, and hasn't been an issue for pre-release versions for 4 years.

That release, and indeed the latest modern GPGTools releases, support 10.6 and
above so there's no reason to suspect people are actually encountering the old
versions in the wild with enough regularity to merit this being a permanent part
of our codebase any more.

In the last two years Homebrew has seen one Issue where MacGPG2 was the problem,
and that wasn't reproducible at the time (and still isn't), and the `doctor` check
likely wasn't even raised there. There has only been one Issue where the MacGPG2
`doctor` check was raised in that two year period.

I think it's fair to treat this as an user configuration outlier now rather than
an issue we need to be constantly on guard for.

Ref: Homebrew/legacy-homebrew@dfb171b
Ref: Homebrew/legacy-homebrew#12238
Ref: Homebrew/legacy-homebrew@046498b
2016-08-10 08:16:09 +01:00
Mike McQuaid
164e46a729 Add missing development_tools requires. 2016-07-29 21:21:02 -06:00
Mike McQuaid
9f74ca80af diagnostic: port to generic layer. 2016-07-27 15:05:42 -06:00
Vlad Shablinsky
3fb5d70a72
Unify Version.create usage
Substitue each Version.new and HeadVersion.new with Version.create
to unify Version and HeadVersion instantiation among core code.

Note that this does not relate to Mac::OS::Version class.
2016-07-16 20:39:13 +08:00
Dominyk Tiller
288aff5365
diagnostic: adopt more certain tone
Closes #481.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-07-10 12:41:08 +01:00
Martin Afanasjew
77dd9d56ff Use GitRepositoryExtension for HOMEBREW_REPOSITORY 2016-07-07 01:46:58 +02:00
Mike McQuaid
59074e91d6 diagnostic: more porting to generic OS. (#449) 2016-07-04 18:35:03 +01:00
Martin Afanasjew
5954877962 diagnostic: use 'Utils.git_version', simplify code
Prefer `Utils.git_version` instead of duplicating version detection
logic. Decouple unnecessary conflated availability and version checks.

Closes #351.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-06-19 22:12:34 +02:00
Mike McQuaid
8a582f2bd9 Make diagnostic code cross-platform. 2016-05-08 16:51:22 +01:00
Andrew Janke
6f80b4688b doctor: guard against nil Xcode.version (#197)
MacOS::Xcode.version may be nil (when neither Xcode nor CLT are installed),
so guard against that where it may happen in `brew doctor`.
2016-05-04 15:54:01 -04:00
Martin Afanasjew
8600b9edf1 Update Homebrew/homebrew references in comments
Replace `homebrew` with `brew`, `homebrew-core`, or `legacy-homebrew`
depending on context.
2016-05-02 21:19:09 +02:00
Andrew Janke
a3b70d38a7 brew-audit: pull style checks in to main audit output
This collects all violations for each formula in a single place, instead
of doing `brew style` outputs for all formulae first, and then the other
audit checks.

Closes #112.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-21 14:45:33 -04:00
Misty De Meo
f5f41f2079 doctor: remove autotools check 2016-04-21 09:36:30 -07:00
Martin Afanasjew
883751d666 diagnostic: fix style of previously skipped method
Fix style of previously omitted `check_for_bad_install_name_tool`
method to be in line with changes made in #49.

Closes #56.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-09 16:12:17 +02:00