NuGet restore exits with code 0 errorlevel when packages not found #1186

Closed
zarenner opened this Issue Aug 14, 2015 · 2 comments

Projects

None yet

6 participants

@zarenner

Failing to restore a package incorrectly returns 0:
C:\Users\zarenner>nuget restore -PackagesDirectory %temp%
Restoring NuGet package SomePackageThatDoesntExist.100.0.0.
WARNING: Unable to find version '100.0.0' of package 'SomePackageThatDoesntExist'.
Unable to find version '100.0.0' of package 'SomePackageThatDoesntExist'.

C:\Users\zarenner>echo %errorlevel%
0

Other failures correctly return 1:
C:\Users\zarenner>nuget restore sdfdsf
Could not find a part of the path 'C:\Users\zarenner\sdfdsf'.

C:\Users\zarenner>echo %errorlevel%
1

@yishaigalatzer

@zarenner what version of nuget.exe are you reporting this?

@yishaigalatzer yishaigalatzer added this to the 3.2.0-commandline milestone Aug 18, 2015
@zarenner

@yishaigalatzer Repros in latest dev.

@zhili1208 zhili1208 added a commit to NuGetArchive/NuGet.PackageManagement that referenced this issue Aug 19, 2015
@zhili1208 zhili1208 fixed NuGet/Home#1186 28e9cdc
@zhili1208 zhili1208 referenced this issue in NuGetArchive/NuGet.PackageManagement Aug 19, 2015
Closed

fixed https://github.com/NuGet/Home/issues/1186 #72

@zhili1208 zhili1208 added a commit to NuGetArchive/NuGet.PackageManagement that closed this issue Aug 20, 2015
@zhili1208 zhili1208 fixed NuGet/Home#1186 9480217
@RanjiniM RanjiniM added the 2 - Working label Sep 1, 2015
@RanjiniM RanjiniM assigned bhuvak and zhili1208 and unassigned zhili1208 and bhuvak Sep 1, 2015
@zhili1208 zhili1208 assigned feiling and unassigned zhili1208 Sep 1, 2015
@feiling feiling added 3 - Done and removed 2 - Working labels Sep 2, 2015
@feiling feiling removed their assignment Sep 2, 2015
@twcclegg twcclegg referenced this issue in appveyor/website Sep 9, 2015
Merged

Get nuget v3.2.0-rc to get fix of issue 1186 #92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment