fsprojects / fsprojects/Paket

Clearing cache corrupts paket tool

Open
#3,879 7 comments 0 reactions 0 assignees View on GitHub

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
  1. Install paket locally in an application using dotnet core dotnet new tool-manifest, dotnet tool install paket, dotnet tool restore
  2. 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.
  1. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.