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

Commit

Permalink
This cleans up config after fix #421.
Browse files Browse the repository at this point in the history
This fixes #421 and #430 (comment)
  • Loading branch information
Redsandro committed Mar 4, 2014
1 parent e75424f commit cd11749
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/helpers/functions/Get-BinRoot.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ function Get-BinRoot {

$binRoot = ''

# Clean up wrongfully set C:\
if ($env:ChocolateyBinRoot -eq $env:systemdrive) {
# Read but untested: Setting a variable = an empty string will remove it completely.
$env:ChocolateyBinRoot = ''
}

# For now, check old var first
if ($env:ChocolateyBinRoot -eq $null) { # If no value
if ($env:chocolatey_bin_root -eq $null) { # Try old var
$binRoot = join-path $env:systemdrive 'tools'
$env:ChocolateyBinRoot = join-path $env:systemdrive 'tools'
}
else {
$env:ChocolateyBinRoot = $env:chocolatey_bin_root
Expand Down

0 comments on commit cd11749

Please sign in to comment.