Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet list return code changed #12479

Closed
groogiam opened this issue Mar 10, 2023 · 1 comment
Closed

dotnet list return code changed #12479

groogiam opened this issue Mar 10, 2023 · 1 comment
Labels
Functionality:ListPackage dotnet.exe list package Type:DCR Design Change Request

Comments

@groogiam
Copy link

NuGet Product(s) Affected

dotnet.exe

Current Behavior

It appears the return codes for dotnet list have been changed to return 1 instead of 0 if there is a failure to list packages for an project in a solution. Previously this was not the case. The behavior change is breaking and has implications for build automation using dotnet list.

src/MySln.sln package --vulnerable --include-transitive

Desired Behavior

Previously the command would return a 0 exit node. It would print something like The project DockerCompose\docker-compose.dcproj uses package.config for NuGet packages, while the command works only with package reference projects. for any projects it could not list. Recently it has been changed to return a non zero exit code which is breaking existing build automation logic.

Additional Context

Originally Reported Here dotnet/sdk#30975

@groogiam groogiam added Triage:Untriaged Type:DCR Design Change Request labels Mar 10, 2023
@nkolev92 nkolev92 added the Functionality:ListPackage dotnet.exe list package label Mar 13, 2023
@erdembayar
Copy link
Contributor

erdembayar commented Mar 13, 2023

Thank you for filing this issue, returning non-zero value was expected change to inform there is possible security vulnerability or deprecated package, other problem in your dependencies, you can check spec here. If it's returning 1 then, please kindly check your console log for actual problem.
You can either update the packages or change your return code handling in your CI script.
We have follow up issue for improving the return exit code for more clarity, please go to #11315 and upvote or comment. We prioritize investigations based on community engagement such as comments and up-votes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:ListPackage dotnet.exe list package Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

4 participants