Skip to content

Commit

Permalink
patch exiting installs with 7zip fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mwrock committed Jul 10, 2015
1 parent 50973ab commit 8d0e740
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Boxstarter.Chocolatey/Check-Chocolatey.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ function Check-Chocolatey ([switch]$ShouldIntercept){
Import-Module $mod_install -Global -Force -DisableNameChecking
}
}

# patching existing installs with tools\7zip
$currentChocoInstall = $env:ChocolateyInstall
if($currentChocoInstall -eq $null) {
$currentChocoInstall = "$env:programdata\chocolatey"
}
$chocoInstallPath = Join-Path $currentChocoInstall 'ChocolateyInstall'
if(!(Test-Path $chocoInstallPath)){
New-Item -Path $chocoInstallPath -ItemType Directory
}
Copy-Item (Join-Path $Boxstarter.VendoredChocoPath 'ChocolateyInstall/tools') $chocoInstallPath -recurse -force

if(!$BoxstarterIntrercepting)
{
Write-BoxstarterMessage "Chocolatey installed, setting up interception of Chocolatey methods." -Verbose
Expand Down

0 comments on commit 8d0e740

Please sign in to comment.