Skip to content
This repository has been archived by the owner on May 22, 2018. It is now read-only.

Commit

Permalink
Plan a bit for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
wfarr committed May 12, 2013
1 parent ee0dce6 commit ea6f1fb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/puppet/provider/package/homebrew.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,20 @@ def simplify name
end

private
def homedir_prefix
case Facter[:osfamily].value
when "Darwin" then "Users"
when "Linux" then "home"
else
raise "unsupported"
end
end

def command_opts
@command_opts ||= {
:combine => true,
:custom_environment => {
"HOME" => "/Users/#{Facter[:boxen_user].value}",
"HOME" => "/#{homedir_prefix}/#{Facter[:boxen_user].value}",
"PATH" => "#{self.class.home}/bin:/usr/bin:/usr/sbin:/bin:/sbin",
"CFLAGS" => "-O2",
"CPPFLAGS" => "-O2",
Expand Down

0 comments on commit ea6f1fb

Please sign in to comment.