Commit Graph
201 Commits
Author SHA1 Message Date
Cheng XU 9232ca4508 system_command: allow redacting secrets in the log
Add a new argument `secrets` to specify secret tokens, so we can redact them in the log.
2019-07-18 15:06:32 +08:00
Mike McQuaid fc6bd2ea1c Fixup more frozen string handling. 2019-04-20 14:07:29 +09:00
Mike McQuaid 36dbad3922 Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
EricFromCanada 89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04:00
EricFromCanada fa6404e0f5 grammar fixes 2019-04-13 21:29:32 -04:00
Markus Reiter 62a0c2fed9 Retry with ditto when “End-of-central-directory signature not found.”. 2019-04-02 13:27:20 +02:00
Mike McQuaid 774adaf435 exceptions: remove unused scp exception.
The code was removed but the exception was not.
2019-03-28 10:34:02 +00:00
Mike McQuaid 14dc7d6bb8 exceptions: fix RuboCop warning with present? 2019-03-18 14:30:58 +00:00
Maxim BelkinandGitHub c44c8da5e0 exceptions.rb: remove unnecessary chomps
remove `chomp!` from method 'initialize' in class 'BuildFlagsError'
2019-02-11 05:27:22 -06:00
Maxim Belkin db7997e1a0 exceptions.rb: move alternative solution to a new line 2019-02-11 01:02:31 -06:00
Shaun Jackman 265ab264fd ErrorDuringExecution: Fix wrong number of arguments
Error: wrong number of arguments (given 1, expected 2)
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/exceptions.rb:548:in `block in initialize'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/exceptions.rb:557:in `map'
2019-01-02 10:12:12 -08:00
FX Coudert 6b779c4f6d exceptions.rb: avoid failure if no arguments 2018-11-07 15:44:21 +01:00
EricFromCanada 20167e5f1b Adjust comments to tidy API docs output. 2018-10-18 21:42:43 -04:00
Markus Reiter 16618d0fc7 Use ActiveSupport’s #pluralize and #to_sentence. 2018-10-07 23:10:56 +02:00
Markus Reiter c4d418e126 Use ActiveSupport’s #second. 2018-10-07 23:10:56 +02:00
samuelaandGitHub eed915103b "occured" -> "occurred" 2018-10-05 12:04:19 -07:00
William WoodruffandGitHub 2246780f0b Merge pull request #4853 from woodruffw/error-pipe-check-closed
utils/fork: Check if error pipe is closed
2018-09-19 10:00:01 -04:00
William Woodruff a59b708de9 exceptions: Language nit in ChildProcessError 2018-09-18 22:22:33 -04:00
Markus Reiter e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
William Woodruff 367629d289 utils: Use JSON to marshal child errors
Replaces our serialization of child process
errors via Marshal with JSON, preventing
unintentional or malicious code execution outside
of the build sandbox.

Additionally, adds tests for the new behavior.
2018-09-04 11:03:32 -04:00
Mike McQuaidandGitHub 7df5b7057e Revert "Use JSON to marshal errors from children" 2018-08-18 08:20:13 +01:00
William WoodruffandWilliam Woodruff 5c90833f0a Use JSON to marshal errors from children 2018-08-17 15:23:08 -04:00
Markus Reiter 8ae284e871 Use SystemCommand for curl. 2018-08-01 01:04:42 +02:00
ilovezfsandGitHub cd2b85c40f Revert "Use SystemCommand for curl." 2018-07-29 21:45:04 -07:00
Markus Reiter 355df64d93 Use SystemCommand for curl. 2018-07-29 01:23:33 +02:00
Markus Reiter 2712fcaa67 Use interleaved output for ErrorDuringExecution. 2018-07-19 16:53:11 +02:00
Markus Reiter 2452b27866 Refactor ErrorDuringExecution. 2018-07-19 16:41:27 +02:00
Andrew Janke e0a8a79921 Style fixes for Rubocop 0.57.1 2018-06-30 19:40:14 -04:00
Ryan Greenberg fe8939ddd0 brew: Add ScpDownloadStrategy 2018-04-05 18:57:34 -07:00
Markus Reiter 94f2098c36 Only use HOMEBREW_TAP_PATH_REGEX once inside Tap class. 2018-03-29 22:05:02 +02:00
Mike McQuaid 70253f0009 Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made.
2018-03-03 09:42:25 +00:00
Alyssa Ross a9dc02a586 Don't suggest install from bottle if not available
It only makes sense to tell a user to try installing from a bottle if
there are bottles available for them to install for all the formulae
they specified.
2018-01-28 22:47:39 +00:00
Markus Reiter 9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Shaun Jackman 3ed832d4f0 BottleLoader: Use the formula stored in the bottle 2017-09-28 12:29:23 -07:00
Mike McQuaid cf5fdeef1d Rubocop: manual rule fixes. 2017-09-24 21:23:59 +01:00
Markus Reiter 6d6ce7cf0a Detect Tap in CaskLoader. 2017-07-30 14:22:05 +02:00
Mike McQuaid 7a0aff1080 Autocorrect Rubocop Style/PerlBackrefs. 2017-06-10 20:23:20 +03:00
Mike McQuaid 99c897acad BuildError: report options to analytics.
Without this it's not easy to make much sense of these failures.
2017-06-09 14:53:01 +03:00
Markus Reiter 2d6ae61314 Re-revert "Fix operator spacing." 2017-06-02 19:22:05 +02:00
ilovezfsandGitHub 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
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
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
Mike McQuaid 2047dbd50e Update all references to taps.
- Remove taps that are (or will shortly be) deprecated.
- Remove commands that are only relevant to the boneyard (which will
  shortly be removed).
2017-03-26 19:42:35 +01:00
Alyssa Ross ade8128a18 formulary: handle ScriptError in formula
I added a new `FormulaUnreadableError` subclass of
`FormulaUnavailableError` so existing `rescue`s of
`FormulaUnavailableError` handle this as well.

The new subclass will output the name of the formula with the error
(because this isn't always obvious from the original exception message)
followed by the original error message.

Fixes #1927.
2017-02-01 18:34:20 +00:00
Mike McQuaid 598c5e36f9 Tell people to report URL/tap deprecations to the tap.
Rather than Homebrew/brew or Homebrew/homebrew-core.
2016-12-10 13:04:14 +00:00
Mike McQuaid 3c77faeb14 exceptions: better handle unsupported macOS versions.
Don’t fail on `OS::ISSUES_URL` being missing (which happens on
unsupported macOS versions) and instead tell people to not file issues.
2016-11-24 08:54:38 +00:00
Mike McQuaid a1e798d964 exceptions: reorder output based on importance. 2016-11-05 15:39:25 -04:00
Mike McQuaid 83af084079 exceptions: use specific build error checks. 2016-11-05 10:58:39 -04:00
Markus Reiter b306f14b97 Rename FormulaMethodDeprecatedError to MethodDeprecatedError. 2016-10-08 13:26:10 +02:00