Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Set HOME env var in Windows installer.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Manning committed Oct 7, 2011
1 parent 71b900c commit ef0357b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions dist/resources/exe/heroku.iss
Expand Up @@ -29,6 +29,7 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environmen
ValueData: "{olddata};{pf}\git\bin"; Check: NeedsAddPath(ExpandConstant('{pf}\git\bin'))
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: "expandsz"; ValueName: "Path"; \
ValueData: "{olddata};{pf}\git\cmd"; Check: NeedsAddPath(ExpandConstant('{pf}\git\cmd'))
Root: HKCU; Subkey: "Environment"; ValueType: "expandsz"; ValueName: "HOME"; ValueData: "%USERPROFILE%"; Flags: createvalueifdoesntexist

[Run]
Filename: "{tmp}\git.exe"; Parameters: "/silent /nocancel /noicons"; \
Expand Down
2 changes: 1 addition & 1 deletion lib/heroku/updater.rb
@@ -1,7 +1,7 @@
module Heroku
module Updater
def self.home_directory
running_on_windows? ? ENV['USERPROFILE'] : ENV['HOME']
ENV['HOME'] || ENV['USERPROFILE']
end

def self.running_on_windows?
Expand Down

0 comments on commit ef0357b

Please sign in to comment.