From 3f8f2c672632d74c188adab5d7fdc879ef0c008a Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 5 Nov 2017 20:30:52 +0000 Subject: bump-formula-pr: use GitHub vars under env filter. Ensure that the various variables are passed through and reset correctly. If we end up doing this in a bunch of places we may add some helpers to simplify this. --- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Library/Homebrew/dev-cmd') diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index 9fe70da6b..b50ec53d6 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -117,6 +117,14 @@ module Homebrew # user path, too. ENV["PATH"] = ENV["HOMEBREW_PATH"] + # Setup GitHub environment variables + %w[GITHUB_USER GITHUB_PASSWORD GITHUB_TOKEN].each do |env| + homebrew_env = ENV["HOMEBREW_#{env}"] + next unless homebrew_env + next if homebrew_env.empty? + ENV[env] = homebrew_env + end + formula = ARGV.formulae.first if formula -- cgit v1.2.3