fsprojects / fsprojects/Paket

find-packages command fails when using UNC paths

Open
#4,243 1 comment 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

find-packages command fails when using UNC paths

Description

The find-packages command fails when using UNC paths.

Here is a copy of my paket.dependencies file:

source ~/nuget
source https://api.nuget.org/v3/index.json

storage: none
nuget FSharp.Core

When I run this command:

dotnet paket find-packages FSharp.Core

I get this error:

Paket version 8.0.3+75b30cdcb8859e8d129f139444d9b9b600bfff07
Total time taken: 211 milliseconds
Paket failed with
-> DirectoryNotFoundException: Could not find a part of the path 'C:\Users\remond\perso\github\NugetHelper\~\nuget'.

But if I run this command:

dotnet paket add FSharp.Core

It works fine.

Repro steps

Steps to reproduce the problem

  1. dotnet new tool-manifest

  2. dotnet tool install paket

  3. dotnet paket init

  4. Modify paket.dependencies to add a source with a UNC path

    source https://api.nuget.org/v3/index.json
    source ~/nuget
    
    storage: none
    
  5. Run dotnet paket find-packages FSharp.Core

Expected behavior

The find-packages command should work with UNC paths and include the packages from the UNC path in the results.

Actual behavior

The find-packages command fails with a DirectoryNotFoundException.

Known workarounds

Add the --source <source URL> option to the find-packages command when you know the package is in a specific source.

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 by reproducing the issue with the listed tool-manifest, Paket initialization, paket.dependencies sources, and dotnet paket find-packages FSharp.Core command. Compare its handling of the ~/nuget source with the working dotnet paket add FSharp.Core path. Done means find-packages accepts the path and includes packages from that source without a DirectoryNotFoundException.

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
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.