Skip to content

Commit

Permalink
Remove env_ensure_home (ScoopInstaller#1967)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon93s authored and r15ch13 committed May 4, 2018
1 parent ed10e73 commit 0c80872
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions lib/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ function install_app($app, $architecture, $global, $suggested, $use_cache = $tru
# persist data
persist_data $manifest $original_dir $persist_dir

# env_ensure_home $manifest $global (see comment for env_ensure_home)
post_install $manifest $architecture

# save info for uninstall
Expand Down Expand Up @@ -864,29 +863,6 @@ function env_rm($manifest, $global) {
}
}

# UNNECESSARY? Re-evaluate after 3-Jun-2017
# Supposedly some MSYS programs require %HOME% to be set, but I can't
# find any examples.
# Shims used to set %HOME% for the session, but this was removed.
# This function remains in case we need to support this functionality again
# (e.g. env_ensure_home in manifests). But if no problems arise by 3-Jun-2017,
# it's probably safe to delete this, and the call to it install_app
function env_ensure_home($manifest, $global) {
if($manifest.env_ensure_home -eq $true) {
if($global){
if(!(env 'HOME' $true)) {
env 'HOME' $true $env:ALLUSERSPROFILE
$env:HOME = $env:ALLUSERSPROFILE # current session
}
} else {
if(!(env 'HOME' $false)) {
env 'HOME' $false $env:USERPROFILE
$env:HOME = $env:USERPROFILE # current session
}
}
}
}

function pre_install($manifest, $arch) {
$pre_install = arch_specific 'pre_install' $manifest $arch
if($pre_install) {
Expand Down

0 comments on commit 0c80872

Please sign in to comment.