297 Commits

Author SHA1 Message Date
Mike McQuaid
549b02f20a
Manual brew style fixes. 2018-11-02 17:29:26 +00:00
Mike McQuaid
737b84b54b
brew style --fix fixes. 2018-11-02 17:29:23 +00:00
Mike McQuaid
51af87f85f
Add HOMEBREW_FORCE_HOMEBREW_ON_LINUX
This serves a similar purpose to the HOMEBREW_FORCE_HOMEBREW_ORG
variable but applies to more settings.
2018-10-20 13:58:27 +01:00
EricFromCanada
20167e5f1b Adjust comments to tidy API docs output. 2018-10-18 21:42:43 -04: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
72f350e757 Use ActiveSupport’s #second_to_last. 2018-10-07 23:10:56 +02:00
Markus Reiter
a9128c543c Use ActiveSupport’s #days. 2018-10-07 23:10:56 +02:00
Mike McQuaid
ead23d1f4c
Use ActiveSupport File.atomic_write
nd delete our own implementation.
2018-09-18 09:20:40 +01:00
Mike McQuaid
0c6331878f
Use ActiveSupport Hash#deep_merge
And delete our own implementation.
2018-09-17 14:53:01 +01:00
Mike McQuaid
955214abc0
Use ActiveSupport Object#blank? and #present? 2018-09-14 17:02:19 +01:00
Shaun Jackman
a37d46f195
Merge pull request #4772 from alebcay/linuxbrew-merge
Set HOMEBREW_BOTTLE_DEFAULT_DOMAIN based on operating system
2018-09-12 11:11:13 -07: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
Caleb Xu
25817d3589 Set HOMEBREW_BOTTLE_DEFAULT_DOMAIN based on operating system 2018-09-09 15:29:27 -04:00
Markus Reiter
eca488a966 Add $LOAD_PATH for RuboCop cops. 2018-09-06 01:10:47 +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
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
90b3a13909
cask: move cask/lib/hbc/* to cask/*.
Fix the load path, requires and some filenames accordingly.
2018-09-04 09:56:57 +01: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
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
Markus Reiter
eccd20e276 Merge Hbc::Container classes into UnpackStrategy. 2018-07-24 16:44:27 +02:00
Markus Reiter
5841b992ac Refactor $LOAD_PATH. 2018-07-17 23:38:57 +02:00
Mike McQuaid
256dfc1af9 Move methods from FileUtils to Formula
These don't need to live on FileUtils and don't really make sense there
either.
2018-07-14 18:13:23 +01:00
Andrew Janke
c644392a85 Display collected caveats at end of install or upgrade 2018-07-12 20:41:32 -04:00
Mike McQuaid
f080ebebbb global: handle HOMEBREW_BOTTLE_DOMAIN fallback.
If users have auto-updated then these variables may not be set.
2018-07-10 21:58:20 +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
Markus Reiter
c53a52daee Move --version logic into cmd/--version.rb. 2018-05-21 05:35:44 +02:00
Gautham Goli
d22b750e17 Store common switch as Homebrew.args global var 2018-04-10 00:00:35 +05:30
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Gautham Goli
d45ff9c0fd audit: Add a global flag to silent warning when auditing 2017-09-04 23:57:09 +05:30
Markus Reiter
3b4ee58c49 Refactor using Forwardable and DelegateClass. 2017-06-28 09:25:31 +02:00
Mike McQuaid
021cef4b2b Autocorrect Rubocop Style/SpecialGlobalVars. 2017-06-12 09:11:42 +01:00
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
a16746906d Add PATH class. 2017-04-30 21:11:27 +02:00
Mike McQuaid
6b0afa3e9c Remove puts_hash, require pp
I wasn’t aware this existed when I created puts_hash so: may as well
remove it.
2017-04-24 11:45:32 +01:00
Mike McQuaid
45a7730f61 Fix and remove various TODOs.
Fix those that can be done so without tearing Homebrew to pieces and
remove the comments for those that can never be done.
2017-04-23 15:10:18 +01:00
Mike McQuaid
e7e53b89fc global: set HOMEBREW_PATH if unset. 2017-04-23 11:40:53 +01:00
Mike McQuaid
d02b4f321d Hide sensitive tokens from install/test/post.
Hide these tokens to avoid malicious subprocesses e.g. sending them
over the network. Also, support using these tokens with environment
filtering and clear `HOMEBREW_PATH` from subprocesses to stop them
sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s
PATH for e.g. `brew doctor` etc.
2017-04-22 16:31:19 +01:00
ilovezfs
a81bd81a14 brew uninstal alias for brew uninstall
If `brew instal` is permissible, `brew uninstal` should be, too.
2017-02-21 04:37:46 -08:00
Mike McQuaid
9344174379 Use HTTPS for the homepage. 2017-02-12 13:58:07 +00:00
Mike McQuaid
34e03532a0 audit: improve homepage audit reliability.
Try first with an (exact, actual) browser user agent from Safari and
then try again with the default Homebrew `curl` user agent.
2017-01-26 16:19:38 +00:00
Mike McQuaid
e7a81caaf4 Allow brew audit to fake a Safari user-agent.
This allows us to detect if homepages such as e.g. `aiccu` which
blocks `curl` are up or not.
2017-01-07 14:03:08 +00:00
Mike McQuaid
e6fb3c3114 curl: make curl_args more configurable.
Allow configuring whether output should be shown or the default the
default user agent is used.
2016-12-29 12:51:12 +00:00
Markus Reiter
6c1d42386d Remove flat_map compatibility layer. 2016-11-14 09:45:44 +01:00
Markus Reiter
0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Markus Reiter
e851c9bf6c Style/Alias: Prefer alias. 2016-09-23 18:19:53 +02:00
Mike McQuaid
1bdbb0f462 Improve rescue nesting. 2016-09-17 17:01:04 +01:00