Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit baaebe1

Browse files
committed
Merge pull request #30 from boxen/s3-bucket
Respect the S3 configuration when installing brew recipes
2 parents f85f8f3 + 364a901 commit baaebe1

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

lib/puppet/provider/package/homebrew.rb

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,25 @@ def default_user
165165
Facter.value(:boxen_user) || Facter.value(:id) || "root"
166166
end
167167

168+
def s3_host
169+
Facter.value(:boxen_s3_host) || 's3.amazonaws.com'
170+
end
171+
172+
def s3_bucket
173+
Facter.value(:boxen_s3_bucket) || 'boxen-downloads'
174+
end
175+
168176
def command_opts
169177
@command_opts ||= {
170178
:combine => true,
171179
:custom_environment => {
172-
"HOME" => "/#{homedir_prefix}/#{default_user}",
173-
"PATH" => "#{self.class.home}/bin:/usr/bin:/usr/sbin:/bin:/sbin",
174-
"CFLAGS" => "-O2",
175-
"CPPFLAGS" => "-O2",
176-
"CXXFLAGS" => "-O2"
180+
"HOME" => "/#{homedir_prefix}/#{default_user}",
181+
"PATH" => "#{self.class.home}/bin:/usr/bin:/usr/sbin:/bin:/sbin",
182+
"CFLAGS" => "-O2",
183+
"CPPFLAGS" => "-O2",
184+
"CXXFLAGS" => "-O2",
185+
"BOXEN_S3_HOST" => "#{s3_host}",
186+
"BOXEN_S3_BUCKET" => "#{s3_bucket}"
177187
},
178188
:failonfail => true,
179189
:uid => default_user

0 commit comments

Comments
 (0)