From 5241d07474586f85f513357a989ecbb74ea69c30 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 13 Nov 2017 10:01:54 +0000 Subject: environment filtering: pass through TRAVIS vars. We use these internally so let's map them to `HOMEBREW_` variables. --- Library/Homebrew/extend/os/mac/diagnostic.rb | 4 ++-- Library/Homebrew/extend/pathname.rb | 2 +- Library/Homebrew/formula_installer.rb | 2 +- Library/Homebrew/test/spec_helper.rb | 2 +- Library/Homebrew/utils/curl.rb | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 65b8d7cde..5c603ca62 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -56,7 +56,7 @@ module Homebrew # `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew # repository. This only needs to support whatever CI provider # Homebrew/brew is currently using. - return if ENV["TRAVIS"] + return if ENV["HOMEBREW_TRAVIS"] message = <<~EOS Your Xcode (#{MacOS::Xcode.version}) is outdated. @@ -83,7 +83,7 @@ module Homebrew # `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew # repository. This only needs to support whatever CI provider # Homebrew/brew is currently using. - return if ENV["TRAVIS"] + return if ENV["HOMEBREW_TRAVIS"] <<~EOS A newer Command Line Tools release is available. diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 82cf10be0..07919f8a0 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -495,7 +495,7 @@ module ObserverPathnameExtension MAXIMUM_VERBOSE_OUTPUT = 100 def verbose? - return ARGV.verbose? unless ENV["TRAVIS"] + return ARGV.verbose? unless ENV["HOMEBREW_TRAVIS"] return false unless ARGV.verbose? if total < MAXIMUM_VERBOSE_OUTPUT diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 42abe5171..2285fee91 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -702,7 +702,7 @@ class FormulaInstaller Utils.safe_fork do # Invalidate the current sudo timestamp in case a build script calls sudo. # Travis CI's Linux sudoless workers have a weird sudo that fails here. - system "/usr/bin/sudo", "-k" unless ENV["TRAVIS_SUDO"] == "false" + system "/usr/bin/sudo", "-k" unless ENV["HOMEBREW_TRAVIS_SUDO"] == "false" if Sandbox.formula?(formula) sandbox = Sandbox.new diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index 08766ea37..c3652fc42 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -9,7 +9,7 @@ require "set" if ENV["HOMEBREW_TESTS_COVERAGE"] require "simplecov" - if ENV["CODECOV_TOKEN"] || ENV["TRAVIS"] + if ENV["CODECOV_TOKEN"] || ENV["HOMEBREW_TRAVIS"] require "codecov" SimpleCov.formatter = SimpleCov::Formatter::Codecov end diff --git a/Library/Homebrew/utils/curl.rb b/Library/Homebrew/utils/curl.rb index eaa81352c..5becf8203 100644 --- a/Library/Homebrew/utils/curl.rb +++ b/Library/Homebrew/utils/curl.rb @@ -27,7 +27,7 @@ def curl_args(*extra_args, show_output: false, user_agent: :default) args << "--fail" args << "--progress-bar" unless ARGV.verbose? args << "--verbose" if ENV["HOMEBREW_CURL_VERBOSE"] - args << "--silent" if !$stdout.tty? || ENV["TRAVIS"] + args << "--silent" if !$stdout.tty? || ENV["HOMEBREW_TRAVIS"] end args + extra_args -- cgit v1.2.3