Clearing cache corrupts paket tool
Open
Nobody has claimed this yet.
bug
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
Running dotnet paket clear-cache command causes paket to become corrupt and unusable
Repro steps
- Install paket locally in an application using dotnet core
dotnet new tool-manifest,dotnet tool install paket,dotnet tool restore - Run
dotnet paket clear-cache:
C:\repos\MyApp> dotnet paket clear-cache
Paket version 5.247.4
- C:\Users\vitor\.nuget\packages
Performance:
- Runtime: 1 second
Paket failed with
-> UnauthorizedAccessException: Access to the path 'C:\Users\vitor\.nuget\packages\paket\5.247.4\tools\netcoreapp2.1\any\Argu.dll' is denied.
- Paket carshes and becomes corrupt:
C:\repos\MyApp>dotnet paket --version
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Users\vitor\.nuget\packages\paket\5.247.4\tools\netcoreapp2.1\any\'.
Failed to run as a self-contained app. If this should be a framework-dependent app, add the C:\Users\vitor\.nuget\packages\paket\5.247.4\tools\netcoreapp2.1\any\paket.runtimeconfig.json file specifying the appropriate framework.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the dotnet paket clear-cache command entry point and reproduce the failure using the local tool-manifest steps on Windows. Trace how the cache entry is removed after the UnauthorizedAccessException; done means clearing the cache does not corrupt Paket and dotnet paket --version still runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100