240 Commits

Author SHA1 Message Date
Markus Reiter
13d9305fad Cache Tty.width, since it is used heavily because of ohai. 2018-06-15 13:56:08 +02:00
Markus Reiter
b2c85ad945 Refactor search. 2018-06-07 13:48:35 +02:00
lukertty
f308aa4800
Tty.width: use tput cols when stty size returns 0;
bin/brew: add 'COLUMNS' and 'LINES' to env variables

Signed-off-by: lukertty <lukertty@gmail.com>
2018-05-30 12:29:24 +08:00
Mike McQuaid
1c91c83eac Merge branch 'master' into bot-comment 2018-05-21 17:16:19 +01:00
Mike McQuaid
e2968c7889 Various cleanup and fixes.
Rename some variables and use existing regexes and a single variable.
2018-05-21 15:36:26 +01:00
Maxim Belkin
7b99ac58ab
Remove ~ from UNSAFE_SHELL_CHAR 2018-05-14 04:45:59 -05:00
Maxim Belkin
e5435dfeb7
Cross-platform diagnostics. 2018-05-14 04:44:15 -05:00
Gautham Goli
26e77dd75c new-formula: Don't fail CI instead comment on PR about audit violations 2018-04-30 10:59:20 +05:30
Mike McQuaid
ae5e904c08 Only read curlrc if HOMEBREW_CURLRC is set.
This reverses the previous, incorrect order.
2018-04-09 15:43:03 -07:00
Mike McQuaid
99b89e4866
Merge pull request #4022 from stefansundin/disable-curlrc
Tell curl to not use .curlrc
2018-04-08 16:37:49 -07:00
Mike McQuaid
54a594ea23
Merge pull request #3870 from GauthamGoli/bump-formula-gh-api
bump-formula-pr: Replace `hub` with GH API calls
2018-04-08 16:02:51 -07:00
Mike McQuaid
0bd5869319 Add/use HOMEBREW_CURLRC variable. 2018-04-08 15:51:58 -07:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Stefan Sundin
0ec47813f1 Prevent .curlrc from being loaded. 2018-04-06 14:13:26 -07:00
Gautham Goli
1e0f9fb835 bump-formula-pr: Replace hub with GH API calls to fork and open Pull request 2018-03-31 19:44:55 +05:30
Mike McQuaid
42445dab9c
Merge pull request #3941 from bukzor/curl-crash
fix: crash when curl is not installed
2018-03-21 08:38:56 +00:00
Buck Evan
0a2e649f00 type -P is more portable than which
Migrated from https://github.com/Linuxbrew/brew/pull/621
2018-03-18 16:51:22 -07:00
Buck Evan
a2646a8694 fix: crash when curl is not installed 2018-03-18 14:09:23 -07:00
Mike McQuaid
cb6828dbe6
Merge pull request #3925 from maxim-belkin/git_remote_exists_bool
append ? to git_remote_exists
2018-03-15 08:20:14 +00:00
Maxim Belkin
c99cfd1591
add ? to svn_remote_exist 2018-03-14 16:55:45 -05:00
Maxim Belkin
f984701c29
append ? to git_remote_exist 2018-03-14 16:30:45 -05:00
Viktor Oreshkin
461bb20b7c utils/git: use exact format for last_revision_*
Format for oneline can be overridden in user's gitconfig. If that's the
case, last_revision_commit_of_file won't work properly, and because of
that last_revision_of_file won't work at all.

Here's what I was getting when running brew tests:

       expected: "6bec2de"
            got: "\e[33m6bec2dee633f\e[m"

I have abbrev length set to 12, and oneline formatting is more colorful.

So, instead of relying on overrideable format, it should rather specify
"--format=%h" to get only hash, and speciy --abbrev=7 to force abbrev
length to be 7

After this commit tests are passing for me.
2018-03-12 14:07:00 +03:00
Mike McQuaid
83cca40fc9 RuboCop 0.53.0 manual fixes. 2018-03-08 14:10:02 +00:00
Mike McQuaid
f2ce6489b2 Use more docs.brew.sh short links
These are nicer on the eyes.
2018-02-22 19:46:58 +00:00
joshua stein
7388acb86e Tty: if HOMEBREW_NO_COLOR env var is present, disable color
bin/brew will recognize NO_COLOR variable and copy it to
HOMEBREW_NO_COLOR
2018-02-12 14:19:25 -06:00
Chayoung You
b05d69f600
Format identifiers in oh1 2018-02-09 18:00:29 +09:00
Mike McQuaid
78933b3ee9 ruby.sh: fix version check.
- Rather than checking for the absence of a failure check for an actual success in the check
- Fix the check to work on Ruby 1.9 (where `RUBY_VERSION.to_s.dup` is required to avoid modifying a frozen string).
2018-01-26 21:47:33 +00:00
Mike McQuaid
1f48e17f1b rubocop: fix brew style warnings. 2018-01-17 10:42:43 +00:00
ilovezfs
17f80a44e6
Revert "Use Homebrew's gitconfig for various commands" 2018-01-15 07:30:56 +00:00
Mike McQuaid
228cbd81c9 Use Homebrew's gitconfig for various commands
Git is a transport and storage mechanism for us so we don't want to
allow arbitrary customisation of this due to user issues e.g. #3664
and #3561.

Fixes #3664.
2018-01-11 20:40:59 +00:00
Mike McQuaid
924865ec7f curl: handle more non-executable curl edge-cases.
Address some additional issues mentioned in #3624.
2018-01-11 16:33:20 +00:00
Shaun Jackman
a4033c7196 Do not specify absolute paths to utilities
Specifying an absolute path to utilities is no longer needed,
since environment filtering uses a default PATH.
2017-12-12 09:25:16 -08:00
Martin Schimandl
0db069602e Refactor: Move FormulaAudit.check_http_content to utils/curl 2017-12-03 14:02:55 +01:00
Shaun Jackman
7adee6d62f Utils.popen_read: Nonexistent program should fail
Ensure that $CHILD_STATUS.success? is false when the command does not exist.
2017-12-02 15:52:01 -08:00
Mike McQuaid
fb6cf0c3f8 More environment filtering fixes
- Make `brew pull` pass through Git environment variables
- Whitelist all `TRAVIS_` variables.
2017-11-27 10:48:03 +00:00
Shaun Jackman
5920c0b2ae setup-analytics: Handle missing /proc/.../uuid 2017-11-23 08:55:15 -08:00
Shaun Jackman
48ed28a154 Change the generic bottle tag to processor-system 2017-11-22 23:06:26 -08:00
Mike McQuaid
5241d07474 environment filtering: pass through TRAVIS vars.
We use these internally so let's map them to `HOMEBREW_` variables.
2017-11-13 10:01:54 +00:00
Mike McQuaid
a7d74e0f53 curl: unset SSL_CERT_FILE. 2017-11-05 14:45:26 +00:00
Mike McQuaid
c59c0d6820
Merge pull request #3376 from tomjonandy/fix/keychain-credentials
Fix issue where keychain github credentials wouldn't work
2017-10-29 16:57:21 +00:00
Michka Popoff
b93ed4124c lock.sh: suppress error output when looking for flock
Fixes (on centos6):
which: no flock in (/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
2017-10-27 15:54:24 +02:00
Thomas Andrew
0e991095f1 Fix issue where keychain github credentials wouldn't work 2017-10-26 18:54:48 +01:00
ilovezfs
1937625d86 github: require formula name to be in issue title 2017-10-24 03:07:33 -07:00
Mike McQuaid
76cd7c7949 Merge pull request #3319 from reitermarkus/squiggly-heredocs
Use “squiggly” heredocs.
2017-10-20 14:10:50 +01:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Shaun Jackman
7a0488e803 setup-ruby-path: Ensure that Ruby is installed
Fix the error:
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.sh: line 372:
exec: : not found
2017-10-17 15:14:58 -07:00
Markus Reiter
175ca909ee Clean up code style and remove .rubocop_todo.yml. 2017-10-08 16:10:37 +02:00
Shaun Jackman
2e77de3b58 Fix installing a local bottle from source
Factor Utils::Bottles.formula_contents out of BottleLoader.
2017-09-28 12:29:23 -07:00
Shaun Jackman
1e57445eca receipt_path: Ensure the bottle contains INSTALL_RECEIPT.json 2017-09-27 09:36:41 -07:00
Mike McQuaid
a589303616 Merge pull request #3183 from MikeMcQuaid/rubocop-upgrade
Rubocop: 0.50.0 and Ruby 2.3
2017-09-25 21:29:03 +01:00