Skip to content
Browse files

FIX: issue 79 (#79) - cinst packages.config does not find package whe…

…n version is not defined = turns out it was the source, not the version, that was messing it up
  • Loading branch information...
1 parent 2eec841 commit dc736b5c9d6bb99c64b0841ae6bf0a8eec6389b8 @ferventcoder ferventcoder committed Apr 24, 2012
Showing with 6 additions and 1 deletion.
  1. +1 −0 src/functions/Chocolatey-PackagesConfig.ps1
  2. +5 −1 src/functions/Run-NuGet.ps1
View
1 src/functions/Chocolatey-PackagesConfig.ps1
@@ -19,6 +19,7 @@ param(
$xml = [xml] (Get-Content $packagesConfigPath)
$xml.packages.package | ?{ $_.id -ne '' -and $_.id -ne $null} | %{
+ Write-Debug "Calling Chocolatey-Install -packageName $_.id -source $_.source -version $_.version"
Chocolatey-Install -packageName $_.id -source $_.source -version $_.version
}
}
View
6 src/functions/Run-NuGet.ps1
@@ -15,6 +15,10 @@ $h2
$srcArgs = "-Source `"http://chocolatey.org/api/v2/`" -Source `"$source`""
}
+ if ($source -like '') {
+ $srcArgs = "-Source `"http://chocolatey.org/api/v2/`" -Source `"https://go.microsoft.com/fwlink/?LinkID=230477`""
+ }
+
$packageArgs = "install $packageName -Outputdirectory `"$nugetLibPath`" $srcArgs"
if ($version -notlike '') {
$packageArgs = $packageArgs + " -Version $version";
@@ -25,7 +29,7 @@ $h2
}
$logFile = Join-Path $nugetChocolateyPath 'install.log'
$errorLogFile = Join-Path $nugetChocolateyPath 'error.log'
- #write-host "TEMP: NuGet Args - $packageArgs"
+ Write-Debug "Calling NuGet.exe $packageArgs"
Start-Process $nugetExe -ArgumentList $packageArgs -NoNewWindow -Wait -RedirectStandardOutput $logFile -RedirectStandardError $errorLogFile
$nugetOutput = Get-Content $logFile -Encoding Ascii

0 comments on commit dc736b5

Please sign in to comment.
Something went wrong with that request. Please try again.