Skip to content

Commit

Permalink
(GH-7) Do not reinstall bin files if no old path
Browse files Browse the repository at this point in the history
  • Loading branch information
ferventcoder committed Feb 13, 2015
1 parent 7280b39 commit 046eb38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nuget/chocolatey/tools/chocolateysetup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Creating Chocolatey folders if they do not already exist.
$realModule = Join-Path $chocolateyPath "helpers\chocolateyInstaller.psm1"
Import-Module "$realModule" -Force

if (-not $allowInsecureRootInstall) {
if (-not $allowInsecureRootInstall -and (Test-Path($defaultChocolateyPathOld))) {
Upgrade-OldChocolateyInstall $defaultChocolateyPathOld $chocolateyPath
Install-ChocolateyBinFiles $chocolateyPath $chocolateyExePath
}
Expand Down Expand Up @@ -225,7 +225,7 @@ param(
Copy-Item "$chocolateyPathOld\lib\*" "$chocolateyPath\lib" -force -recurse

$from = "$chocolateyPathOld\bin"
$to ="$chocolateyPath\bin"
$to = "$chocolateyPath\bin"

This comment has been minimized.

Copy link
@ferventcoder

ferventcoder Feb 13, 2015

Author Member

Slightly perplexing here.... ?

This comment has been minimized.

Copy link
@ferventcoder

ferventcoder Feb 13, 2015

Author Member

Mostly because this was two lines before but now one...

This comment has been minimized.

Copy link
@ferventcoder

ferventcoder Feb 13, 2015

Author Member

I'm not crazy!

$to ="$chocolateyPath\bin"
$exclude = @("choco.exe", "chocolatey.exe", "cinst.exe", "clist.exe", "cpack.exe", "cpush.exe", "cuninst.exe", "cup.exe", "cver.exe", "RefreshEnv.cmd")

This comment has been minimized.

Copy link
@gep13

gep13 Feb 13, 2015

Member

@ferventcoder You are crazy! But in a good way :-P

$exclude = @("choco.exe", "chocolatey.exe", "cinst.exe", "clist.exe", "cpack.exe", "cpush.exe", "cuninst.exe", "cup.exe", "cver.exe", "RefreshEnv.cmd")
Get-ChildItem -Path $from -recurse -Exclude $exclude |
% {
Expand Down

0 comments on commit 046eb38

Please sign in to comment.