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

Get-BinRoot still return "C:\" if %ChocolateBinRoot% set to "C:\" #560

Open
posaunehm opened this issue Aug 28, 2014 · 1 comment
Open

Comments

@posaunehm
Copy link

As discussed in #421 , the return value of Get-BinRoot and %ChocolateBinRoot% has changed to "C:\tools", but Get-BinRoot still return "C:" if %ChocolateBinRoot% set to "C:".

in cd11749 following code had added,

# 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 = ''
}

However, at least my environment (Japanese Win 8.1), $env:systemdrive returns "C:", not "C:", so it doesn't enter inside above if statement. So it should be like following,

if ((join-path $env:ChocolateyBinRoot "") -eq (join-path $env:systemdrive "")) {
}
@ferventcoder
Copy link
Contributor

windows--

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants