fsprojects / fsprojects/Paket

Exception if zip archive content already exist on "paket restore --force"

Open
#2,932 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug crash resilience
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

If you execute restore --force when there already is a unzipped http dependency you will get an exception.

Paket version 5.125.3

paket.exe restore -f on

Repro steps
  1. Put a dependency on any zip file in paket.dependencies:
http file:///X:\Teigha\4.2.0\zip\Teigha-Binaries-4.2.0.zip Teigha\Teigha-Binaries-4.2.0.zip
  1. paket.exe update to download and unzip the dependency
  2. 'paket.exe restore -f' to force paket to redo the download and unzip
Paket failed with
-> IOException: The file 'C:\WS\SDK\paket-files\localhost\Teigha\x64\AcDbPointCloudObj_4.02_11.tx' already exists.
Expected behavior

I expect paket.exe restore -f to overwrite files when unzipping a downloaded archive

Actual behavior

paket.exe restore -f fails to unzip a dependency if its contents already exist.

Known workarounds

Delete files manually before doing paket.exe restore -f

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 with the paket.exe restore -f entry point and the archive dependency declared in paket.dependencies; reproduce the failure using the listed local ZIP path. Trace the restore and extraction flow, then verify that rerunning forced restore overwrites existing archive contents without throwing the reported IOException.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.