747 Commits

Author SHA1 Message Date
Mike McQuaid
056dd588b2
utils/github: add ValidationFailedError.
These have specific errors returned so would be more useful to output.
2018-10-15 12:03:16 -07:00
JBallin
2bf0db40b3 Normalize formatting of gist-logs errors 2018-10-14 20:40:24 -07:00
JBallin
2a1b936f76 Clarify HOMEBREW_GITHUB_API_TOKEN in gist-logs err 2018-10-14 20:40:24 -07:00
Mike McQuaid
c2d23838d0
analytics: fix display of build error options.
Currently these are all like `wget #<Options:0x0000000101171658>`.
2018-10-13 15:09:03 -07:00
Alyssa Ross
864475e14f
bump-formula-pr: use GitHub error message info
This saves an API call, and is more accurate, because the repo API
doesn't actually say whether forking is enabled, but this error message
does.

To do this, the original GitHub error message had to be accessible on
the GitHub exceptions.
2018-10-11 16:39:29 +01:00
L. E. Segovia
094cab89fe
Cask: remove curl calls, use them with --download 2018-10-10 21:36:06 +00:00
L. E. Segovia
4fe0a63482
Cask: address HTTPS->HTTP redirections 2018-10-10 21:36:06 +00:00
Mike McQuaid
c6acab66fe
Merge pull request #5030 from MikeMcQuaid/style-shellcheck
style: check Bash style with shellcheck
2018-10-08 14:25:28 +01:00
Markus Reiter
5dd571adeb Replace #chuzzle with ActiveSupport’s #presence. 2018-10-07 23:10:56 +02: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
Mike McQuaid
4feb851279
Fix brew style shellcheck warnings. 2018-10-07 22:08:59 +01:00
Gautham Goli
c7bf79407a
Better man page formatting 2018-10-03 19:20:26 +05:30
Markus Reiter
2308f0c571 Skip quitting applications when not logged into GUI. 2018-10-02 16:27:45 +02:00
Mike McQuaid
a11fe57cd2
cache_store: handle corrupt DBM database.
When the DBM database cannot be read by the current version of Ruby's
DBM library (due to corruption or another incompatibility) it segfaults
or freezes which takes down the entire Homebrew Ruby process.

This isn't desirable so instead perform a shell out with the Homebrew
Ruby to see if it can read the DBM database before we try to use the
information. If this hangs or crashes: silently delete the database and
recreate it.
2018-09-20 10:57:27 +01:00
Mike McQuaid
b614cad3b5
Merge pull request #4938 from MikeMcQuaid/travis-cleanup
Cleanup Travis and CI configuration.
2018-09-19 15:36:21 +01:00
Mike McQuaid
59c858a8e8
Cleanup Travis and CI configuration.
Use the environment variables set by `brew test-bot`. Eventually we'll
disable Travis CI running CodeCov so move `TRAVIS` references to
`HOMEBREW_TRAVIS_CI` so it doesn't need whitelisted.

Also, fix `azure-pipelines.yml` so it's testing the correct version of
Homebrew/brew (the one checked out in the `pwd`).
2018-09-19 15:01:33 +01:00
William Woodruff
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
649a630826
utils/fork: Check if error pipe is closed
Document special interrupt case.
2018-09-18 22:21:12 -04:00
Shaun Jackman
6bd0379449 Utils::Analytics.custom_prefix_label: Fix typo
Change generic-prefix to custom-prefix.
2018-09-18 09:49:19 -07:00
Mike McQuaid
4d1de3334c
Merge pull request #4912 from MikeMcQuaid/activesupport-hash-deep-merge
Use ActiveSupport Hash#deep_merge
2018-09-18 09:19:24 +01:00
Mike McQuaid
0c6331878f
Use ActiveSupport Hash#deep_merge
And delete our own implementation.
2018-09-17 14:53:01 +01:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Chongyu Zhu
93cac4ccee
utils/analytics: make curl respect HOMEBREW_CURLRC 2018-09-14 18:50:03 +08: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
072127197a Check for range support instead of rescuing error. 2018-09-06 16:25:22 +02:00
William Woodruff
eacdca872e
Merge pull request #4819 from woodruffw/error-pipe
utils: Use JSON to marshal child errors
2018-09-04 21:02:29 -04:00
Markus Reiter
2ca3439ada Fix downloads directory not being created. 2018-09-05 00:38:19 +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 McQuaid
088730c6f1
Revert "Use JSON to marshal errors from children" 2018-09-04 08:37:08 +01:00
William Woodruff
86b9647450
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-03 18:42:59 -04:00
Mike McQuaid
80d75bc0d8
Homebrew/.rubocop: tweak rules.
Adjust the rules based on the current codebase. Remove various enable,
disables and default values that are unnecessary. Add more comments
explaining why. Make minor changes needed to enable a few more rules.
2018-09-02 20:15:09 +01:00
Mike McQuaid
0dc2c72693
Merge pull request #4795 from MikeMcQuaid/tests-leaks-prompt
tests: handle file leaks and SVN test prompt.
2018-09-02 18:31:44 +01:00
Mike McQuaid
bcb1ec5499
Improve Homebrew/brew line length.
Use 124 max line length everywhere. Also, reduce tap max line length to
189 as Homebrew/homebrew-core has that as a maximum now. In future
Homebrew/homebrew-core will also be reduced to 124 maximum line length.
2018-09-02 16:15:09 +01:00
Mike McQuaid
ec9e45a8f0
tests: handle file leaks and SVN test prompt.
- Ignore files that are generated by `brew tests`
- Make the SVN tests work without prompting for GitHub's SSL certificate
2018-09-02 13:43:58 +01:00
Mike McQuaid
7df5b7057e
Revert "Use JSON to marshal errors from children" 2018-08-18 08:20:13 +01:00
William Woodruff
5c90833f0a
Use JSON to marshal errors from children 2018-08-17 15:23:08 -04:00
Gautham Goli
54033d320b utils/github: Raise exceptions if status code != 200 or exit code is not 0 2018-08-15 20:57:22 +05:30
Markus Reiter
9db17ab5bc Allow forcing colored output. 2018-08-02 16:03:44 +02:00
Markus Reiter
681098f4fe Fix ErrorDuringExecution initialization. 2018-08-02 05:56:24 +02:00
Markus Reiter
c98c71ae64 Show stdout for curl commands. 2018-08-01 11:15:42 +02:00
Markus Reiter
96eb404af9
Merge pull request #4583 from reitermarkus/unneeded-rubocop-comment
Remove unneeded RuboCop comment.
2018-08-01 04:46:22 +02:00
Markus Reiter
e2d8e3c6ee Remove unneeded RuboCop comment. 2018-08-01 04:12:31 +02:00
Markus Reiter
8ae284e871 Use SystemCommand for curl. 2018-08-01 01:04:42 +02:00
ilovezfs
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
Mike McQuaid
74c77db5bd shell: tweak export_value parameters.
Let’s have a default value for shell (considering this isn’t a public
API) to make it easier to use.
2018-07-26 10:48:25 +01:00
commitay
7542c4edb7 utils/github: remove full stop from the "skipping" comment 2018-07-25 15:38:14 +10:00
Markus Reiter
2452b27866 Refactor ErrorDuringExecution. 2018-07-19 16:41:27 +02:00
Mike McQuaid
f2d823445e ruby.sh: remove linkage cache on upgrade.
This may not be compatible between portable ruby versions and between
portable and system ruby versions.

Fixes #4485.
2018-07-18 14:09:43 +01:00