61 Commits

Author SHA1 Message Date
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Markus Reiter
61b79318ed Move include Kernel into .rbi files again and split up existing .rbi files. 2020-10-10 19:10:58 +02:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Maxim Belkin
2c5eec509b system_config.rb: refactor code into worker functions
Break down `dump_verbose_config` function into "worker" functions that
display information for specific categories:

- `core_tap_config` for Core tap info
- `homebrew_config` for Homebrew/brew info
- `homebrew_env_config` for environment-related information
- `host_software_config` for Host software

Also, factor out code related to Clang into `describe_clang` function,
so that we can do:

```
f.puts "Clang: #{describe_clang}"
```
2020-09-04 18:27:12 +00:00
Mike McQuaid
8b97c27c21 brew style manual fixes 2020-09-01 14:26:45 +01:00
Markus Reiter
3118fedab9 Refactor and document Git. 2020-08-23 06:40:07 +02:00
Markus Reiter
e2c9e6d3c2 Refactor and document SystemConfig. 2020-08-23 04:15:35 +02:00
Bo Anderson
30a8df0f91 os/mac/system_config: simplify JVM version parsing 2020-08-11 18:51:36 +01:00
Dustin Rodrigues
ad29ee4550 config: include core branch in output 2020-08-02 00:09:52 -04:00
Mike McQuaid
aa81982aba
brew style --fix 2020-06-02 09:49:23 +01:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Mike McQuaid
5f9c98176c
system_config: ignore HOMEBREW_*_GIT_REMOTE.
These aren't interesting enough to show in `brew config` as they
duplicate other data already displayed.
2020-01-18 14:25:38 +00:00
Cheng XU
66697d4290
ENV: add sensitive_environment function
ENV#sensitive_environment is used to list all sensitive environments.

Also refactor the code on determining whether an environment is sensitive.
2019-07-18 15:06:33 +08:00
Mike McQuaid
7c04c34a88
system_config: hide HOMEBREW_BUNDLE_* env vars.
These are being introduced in e.g.
https://github.com/Homebrew/homebrew-bundle/pull/486 and we don't care
about them in Homebrew bug reports.
2019-06-12 12:43:44 +01:00
Mike McQuaid
6b2dbbc96f
Merge pull request #6042 from MikeMcQuaid/boring_homebrew_display
config: don't show HOMEBREW_DISPLAY.
2019-04-22 13:07:20 -07:00
Mike McQuaid
58e57f2d49
config: don't show HOMEBREW_DISPLAY.
This is set by XQuartz and not needed information for us.
2019-04-20 16:22:10 +09:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
b03558e296
system_config: don’t output default HOMEBREW_LOGS.
This cuts down a bit on noise. While we’re here, optimise the checks too.
2019-04-17 17:02:33 +09:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
737b84b54b
brew style --fix fixes. 2018-11-02 17:29:23 +00:00
EricFromCanada
0362e66a26 doctor: use minimum Git version set in brew.sh 2018-10-28 20:13:19 -04:00
EricFromCanada
7c9bea2703 system_config: skip HOMEBREW_GIT as its final path is shown further down 2018-10-26 23:47:59 -04:00
Mike McQuaid
78ddc34847
config: hide optional system packages.
Java, XQuartz and the CLT separate header package aren't required for
everyone's Homebrew usage or a default macOS development install.

As a result, only show then in `brew config` when they are actually
installed.
2018-09-30 10:50:37 +01:00
Mike McQuaid
5ac056fa52
system_config: don't print default HOMEBREW_GIT value.
This is `git` for most people.
2018-09-23 19:43:30 +01:00
commitay
2cb253520e system_config: add HOMEBREW_MACOS_VERSION_NUMERIC to boring_keys 2018-09-23 12:59:03 +10:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Shaun Jackman
3c4f9c746e Elide prefix "/usr/local" in bottle block
brew test-bot --ci-upload is run on a Linux machine.
The macOS bottles have a prefix of "/usr/local".
The default prefix on Linux is /home/linuxbrew/.linuxbrew.
Elide prefix "/usr/local" in the bottle block, even it does not match
the default prefix. Ditto for cellar.
2018-09-11 14:21:33 -07:00
Shaun Jackman
f6093961ef Add Homebrew::DEFAULT_PREFIX for Linux
The default prefix is /usr/local on macOS
and /home/linuxbrew/.linuxbrew on Linux.
2018-09-11 09:57:08 -07:00
Markus Reiter
32ad22395b Remove some #popen_reads. 2018-09-04 05:16:59 +02:00
Mike McQuaid
f46e4596c0 Cleanup HOMEBREW_TEMP handling
- Ensure that `HOMEBREW_TEMP` is only displayed in `brew config` when
  it's non-default.
- Attempt to create a missing `HOMEBREW_TEMP` directory rather than
  failing to `realpath`. Note this will still fail on permissions errors
  which is to be expected.
2018-07-03 15:41:33 +01:00
Mike McQuaid
facd76bc51 portable-ruby: respect HOMEBREW_BOTTLE_DOMAIN variable.
This was requested in:
https://discourse.brew.sh/t/adding-additional-download-sources-to-homebrew/2446

With this change you can use e.g. Artifactory for Homebrew's portable
ruby.
2018-06-29 19:51:18 +01:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Mike McQuaid
9b1bd5f45a system_config: don’t output std/superenv vars. 2018-04-02 09:40:39 +01:00
Mike McQuaid
7095738d1d Remove config/doctor checks we no longer need
A bunch of these were needed before superenv, environment filtering or
on now long-unsupported versions of macOS.
2018-04-02 09:40:39 +01:00
Mike McQuaid
11f315834e system_config: never display default_hash keys.
Otherwise you can end up with duplicate outputs.
2018-03-25 09:43:39 +01:00
Mike McQuaid
fce9d520e7 system_config: don't output HOMEBREW_RUBY_WARNINGS
It's set by default and the output is pretty obvious if changed.
2018-03-22 22:04:31 +00:00
Mike McQuaid
fc7fb60b72
system_config: use some puts for clang. 2018-03-22 08:26:26 +00:00
Buck Evan
8b27b84b4b fix clang build version on Ubuntu Artful
Ported from https://github.com/Linuxbrew/brew/pull/621
2018-03-21 11:53:32 -07:00
Maxim Belkin
a1bf2c072c Use \d instead of 0-9 in regex 2018-02-22 19:25:56 +00:00
Maxim Belkin
5536f49305 Cross-platform java detection 2018-02-22 18:32:21 +00:00
Mike McQuaid
b26a0d4a91 Enable environment filtering for developers.
If folks have set `HOMEBREW_DEVELOPER` or run a `dev-cmd` then enable
environment filtering by default for them.
2017-11-27 10:15:26 +00:00
Mike McQuaid
ccf933f31c
Merge pull request #3435 from MikeMcQuaid/auto-update-checked
Use HOMEBREW_AUTO_UPDATE_CHECKED variable.
2017-11-07 08:26:19 +00:00
Mike McQuaid
5f301755c0 Use HOMEBREW_AUTO_UPDATE_CHECKED variable.
Rather than reusing `HOMEBREW_NO_AUTO_UPDATE` to indicate that we've
already made a check. This allows `HOMEBREW_NO_AUTO_UPDATE` to be
displayed properly by `brew config`.
2017-11-07 08:01:51 +00:00
Mike McQuaid
9358f678a3 Clear/mask passwords as well as tokens. 2017-11-07 07:54:34 +00:00
Mike McQuaid
4892465fc4 system_config: output most HOMEBREW_* variables.
Exclude the boring ones and exclude some that are already printed that
are just using their default values. HOMEBREW_PREFIX is the only one
where we’re always interested in the output to quickly communicate it.
2017-11-05 14:45:36 +00:00
Mike McQuaid
1b69848119 system_config: output curl path and version. 2017-11-05 14:45:36 +00:00
Mike McQuaid
3448335a14 system_config: get perl/ruby from HOMEBREW_PATH.
This is the actual user path when env filtering is enabled.
2017-10-28 20:38:00 +01:00
Shaun Jackman
2f6b8dcf68 describe_java: Suppress stderr
Suppress the error message:
Unable to find any JVMs matching version "(null)".
2017-09-20 13:25:37 -07:00
Mike McQuaid
acb418c488 system_config: look for python formula binary.
Now that Python has been renamed it's important that we still output
which Python they are using for debugging purposes e.g.

```
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7
```
2017-07-21 17:31:35 +01:00
Mike McQuaid
021cef4b2b Autocorrect Rubocop Style/SpecialGlobalVars. 2017-06-12 09:11:42 +01:00