Skip to content

Conversation

AThePeanut4
Copy link
Contributor

I've just run into the same error as #572, in the same scenario (right after updating .NET). I'm also fairly sure I've had it happen before.

If I remove the .dotnet folder in my home directory, I get this output from dotnet tool list:

> mv .dotnet .dotnet2
> DOTNET_NOLOGO=true dotnet tool list --global 2> /dev/null
An issue was encountered verifying workloads. For more information, run "dotnet workload update".
Package Id      Version      Commands
-------------------------------------
<list of packages>

I think this is the the cause of the error, although I'm not 100% sure. Either way, topgrade should parse out the header in a more reliable way than just skipping the first two lines of output.

Standards checklist:

  • The PR title is descriptive.
  • I have read CONTRIBUTING.md
  • The code compiles (cargo build)
  • The code passes rustfmt (cargo fmt)
  • The code passes clippy (cargo clippy)
  • The code passes tests (cargo test)
  • Optional: I have tested the code myself.
    Well, it no longer fails after removing the ~/.dotnet folder. Hopefully this means it should no longer error right after a .NET update.

Copy link

codecov bot commented Apr 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 6.62%. Comparing base (04bfb45) to head (a408fb9).

Files Patch % Lines
src/steps/generic.rs 0.00% 11 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #772      +/-   ##
========================================
- Coverage   6.62%   6.62%   -0.01%     
========================================
  Files         37      37              
  Lines      12164   12173       +9     
========================================
  Hits         806     806              
- Misses     11358   11367       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SteveLauC SteveLauC merged commit ecf8fb7 into topgrade-rs:main Apr 14, 2024
InnocentZero pushed a commit to InnocentZero/topgrade that referenced this pull request May 25, 2024
fix: better dotnet tool list header parsing
@AThePeanut4 AThePeanut4 deleted the fix-dotnet-header-parse branch June 5, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants