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

Commit

Permalink
fixing issue 9 - chocolatey now reinstalls a package when you explici…
Browse files Browse the repository at this point in the history
…tly pass it a version
  • Loading branch information
ferventcoder committed Sep 10, 2011
1 parent e5c15a8 commit f467af1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nuget/chocolatey.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>chocolatey</id>
<title>Chocolatey</title>
<version>0.9.8.8</version>
<version>0.9.8.9</version>
<authors>Rob Reynolds</authors>
<owners>Rob Reynolds</owners>
<summary>Chocolatey is your machine level NuGet repository. Think apt-get for Windows (executables/application packages), not library packages.</summary>
Expand Down
Binary file modified src/NuGet.exe
Binary file not shown.
14 changes: 11 additions & 3 deletions src/chocolatey.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param($command,$packageName='',$source='https://go.microsoft.com/fwlink/?LinkID=


#Let's get Chocolatey!
$chocVer = '0.9.8.8'
$chocVer = '0.9.8.9'
$nugetChocolateyPath = (Split-Path -parent $MyInvocation.MyCommand.Definition)
$nugetPath = (Split-Path -Parent $nugetChocolateyPath)
$nugetExePath = Join-Path $nuGetPath 'bin'
Expand Down Expand Up @@ -68,9 +68,15 @@ $h2
if ($pkgVersionMatches -ne $null) {
$installedPackageVersion = $pkgVersionMatches -replace '\)', '' -replace "'", "" -replace " ", ""
}


if ($installedPackageName -ne '') {
if ($installedPackageName -eq '') {
$regex = [regex]"`"[.\S]+\s?"
$pkgNameMatches = $regex.Matches($line) | select -First 1
$installedPackageName = $pkgNameMatches -replace "`"", "" -replace " ", ""
$installedPackageVersion = $version
}

if ($installedPackageName -ne '') {
$packageFolder = ''
if ($installedPackageVersion -ne '') {
$packageFolder = Join-Path $nugetLibPath "$($installedPackageName).$($installedPackageVersion)"
Expand Down Expand Up @@ -288,6 +294,8 @@ v0.9.8
* .8
- Fixed issue with selector in determining a package to update.
- Fixed issue with version comparison.
* .9
- Fixed issue with new version of NuGet no longer giving version information with an already installed package.
$h2
$h2
using (var legalese = new LawyerText()) {
Expand Down

0 comments on commit f467af1

Please sign in to comment.