aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2017-11-05 20:30:52 +0000
committerMike McQuaid2017-11-07 07:54:34 +0000
commit3f8f2c672632d74c188adab5d7fdc879ef0c008a (patch)
tree2f74ea4532b042b108f5bfcb0e254ddd78eb20d5 /Library
parent2ad17993086af7ceb20123a8ca26e7f84c2311d6 (diff)
downloadbrew-3f8f2c672632d74c188adab5d7fdc879ef0c008a.tar.bz2
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.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dev-cmd/bump-formula-pr.rb8
1 files changed, 8 insertions, 0 deletions
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