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

cinst.bat returns 0 even if NuGet fails #343

Open
lewisthompson opened this issue Sep 27, 2013 · 1 comment
Open

cinst.bat returns 0 even if NuGet fails #343

lewisthompson opened this issue Sep 27, 2013 · 1 comment

Comments

@lewisthompson
Copy link

PS C:\Chocolatey\bin> .\cinst.bat DotNet4.0
Chocolatey (v0.9.8.20) is installing DotNet4.0 and dependencies. By installing you accept the license for DotNet4.0 and each dependency you are installing.
Execution of NuGet not detected. Please make sure you have .NET Framework 4.0 installed and are passing arguments to the install command.
At C:\Chocolatey\chocolateyinstall\functions\Run-NuGet.ps1:52 char:10
    +     Throw <<<<  $noExecution
    + CategoryInfo          : OperationStopped: (Execution of Nu...nstall command.:String) [], RuntimeException
    + FullyQualifiedErrorId : Execution of NuGet not detected. Please make sure you have .NET Framework 4.0 installed and are passing arguments to the install command.

PS C:\Chocolatey\bin> Write-Host $LastExitCode
0

This breaks automation tools, such as http://community.opscode.com/cookbooks/chocolatey

@ferventcoder
Copy link
Contributor

PLease let me know if this is true of the prerelease...

cup chocolatey -pre

We've added better support for exit codes and that will be released soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants