Skip to content

Commit

Permalink
Ensure choco bin is ahead of boxstarter vendored choco bin on the pat…
Browse files Browse the repository at this point in the history
…h and dont copy redirect shims to choco bin even if choco is not preinstalled
  • Loading branch information
mwrock committed Jul 1, 2015
1 parent 7cced0f commit 2970508
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Boxstarter.Chocolatey/install-chocolatey.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,14 @@ function Install-Chocolatey($pkgUrl) {
"@

if(!(Test-Path $chocoBinPath)){
Copy-Item -Path $boxBinPath -Destination $chocoBinPath -Recurse
New-Item -Path $chocoBinPath -ItemType Directory
}

$currentEnv = [Environment]::GetEnvironmentVariable('path', 'Machine')
$newEnv = $currentEnv.Replace($boxBinPath, '')
if($newEnv.IndexOf($chocoBinPath) -eq -1) {
$newEnv += $chocoBinPath + ';'
if($currentEnv.IndexOf($chocoBinPath) -eq -1) {
$currentEnv = $currentEnv.replace($boxBinPath, "$chocoBinPath;$boxBinPath")
}
$newEnv = $newEnv.Replace(';;', ';')
[Environment]::SetEnvironmentVariable("path", $newEnv, 'Machine')
[Environment]::SetEnvironmentVariable("path", $currentEnv, 'Machine')
}
finally {
$env:ChocolateyInstall = $currentChocoInstall
Expand Down
1 change: 1 addition & 0 deletions BuildScripts/releaseNotes.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<releaseNotes>
- Ensure choco bin is ahead of boxstarter vendored choco bin on the path and dont copy redirect shims to choco bin even if choco is not preinstalled.
- Provide better isolation between Boxstarter and User Chocolatey installations.
- Run scheduled tasks in the same directory where it is invoked.
- Default Windows Update criteria now only installs critical updates.
Expand Down

0 comments on commit 2970508

Please sign in to comment.