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
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
e3609b6fd4
Move LinkedKegs/PinnedKegs/Locks from Library.
...
These don't make sense to be tied to the `HOMEBREW_REPOSITORY` but
instead should live in the `HOMEBREW_PREFIX` as they all relate to its
state.
2016-09-16 13:51:56 +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
Xu Cheng
e423617d77
remove ruby 1.8 compatible codes
2016-08-18 14:35:39 +08:00
Mike McQuaid
179ef2bf8c
global: raise unless Ruby 2.
2016-08-17 09:19:56 +01:00
Mike McQuaid
e091e74c0c
global: add Homebrew.raise_deprecation_exceptions
2016-08-12 21:06:00 +01:00
Mike McQuaid
23306ab434
github: produce better curl error messages. ( #441 )
...
* global: add RUBY_TWO global variable.
* test-bot: use RUBY_TWO global variable.
* github: produce better curl error messages.
If we don't know why curl has failed then ensure that the error messages
that it produced are included as part of the user output.
2016-07-12 19:46:29 +01:00
Martin Afanasjew
77dd9d56ff
Use GitRepositoryExtension for HOMEBREW_REPOSITORY
2016-07-07 01:46:58 +02:00
Martin Afanasjew
6cdc6b1460
Add GitRepositoryExtension
...
Add an extension for accessing Git-related meta data that can be mixed
in into a Pathname object (e.g. `HOMBREW_REPOSITORY` or the path of a
`Tap` instance). The goal here is to eliminate code duplication.
2016-07-07 01:46:58 +02:00
Mike McQuaid
bf42959609
Revert "Revert "Test officially supported cmd taps. ( #390 )""
...
This reverts commit dba1958bd79c1c9d18f215dfc2b806ea62edd1c8.
2016-07-04 17:05:37 +01:00