Skip to content

Cannot use relative URLs in dotnet push #10157

@timheuer

Description

@timheuer

Details about Problem

I’m trying to use dotnet nuget push with *.nupkg and 1) the docs are wrong (I submitted a bug) 2) the source parameter seems to require a fully-qualified source and cannot use relative roots?

I’m doing this in CI and am trying to basically use “.” As the source directory but looks like the CLI treats this as too literally and doesn’t like that.

From conversation it appears it could be
https://github.com/NuGet/NuGet.Client/blob/65abcc61f73ab3d87928495f789ec74011edde7f/src/NuGet.Core/NuGet.Commands/Utility/PackageSourceProviderExtensions.cs#L47
Versus using RelativeOrAbsolute

Repro Steps

  1. Produce some nuget packages
  2. Using .NET SDK 3.1.402
  3. Open a terminal/CLI
  4. navigate to where the nuget packages are
  5. run dotnet nuget push . *.nupkg

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions