From @dmccaffery on March 23, 2017 6:49
Steps to reproduce
mkdir -p ~/test-nuget-issue
cd ~/test-nuget-issue
touch test-1.0.0.nupkg
touch nuget.config
dotnet nuget push *.nupkg --config-file nuget.config
Expected behavior
this would normally error out as the config file and package are empty files for the purposes of proving the point, but even with a valid pkg and config file, this does not work as expected as the command line parser does not support the --config-file option indicated in the example docs from:
https://github.com/dotnet/docs/blob/master/docs/core/tools/dotnet-nuget-push.md#examples
Actual behavior
Specify --help for a list of available options and commands.
error: Unrecognized option '--config-file'
The command is missing from the available options in the parser:
https://github.com/dotnet/cli/blob/485237a8a0c61c17858e88b9525d29e0fb426064/src/dotnet/commands/dotnet-nuget/NuGetCommandParser.cs#L50
The ability to set the config file is a pretty important requirement for CI systems that dump nuget credentials to a temporary file as they must appear in clear-text on non-windows platforms. The VSTS tasks do this today, for example, although they use the nuget xplat client directly:
https://github.com/Microsoft/vsts-tasks/blob/d2290c1a38f98a13af6e8e5c06430b498742c5a3/Tasks/NuGetPublisher/nugetpublisher.ts#L122
https://github.com/Microsoft/vsts-tasks/blob/d2290c1a38f98a13af6e8e5c06430b498742c5a3/Tasks/NuGetPublisher/nugetpublisher.ts#L140
https://github.com/Microsoft/vsts-tasks/blob/d2290c1a38f98a13af6e8e5c06430b498742c5a3/Tasks/NuGetPublisher/nugetpublisher.ts#L179
At any rate, if the dotnet-nuget command is forwarding arguments for everything else that the nuget client supports, it should also forward the config file argument. Someone thought of it, obviously, since its in the docs -- it just isn't supported by the dotnet-nuget command today.
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.1)
Product Information:
Version: 1.0.1
Commit SHA-1 hash: 005db40cd1
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /Users/dmccaffery/.dotnet/sdk/1.0.1
Copied from original issue: dotnet/cli#6123
From @dmccaffery on March 23, 2017 6:49
Steps to reproduce
Expected behavior
this would normally error out as the config file and package are empty files for the purposes of proving the point, but even with a valid pkg and config file, this does not work as expected as the command line parser does not support the --config-file option indicated in the example docs from:
https://github.com/dotnet/docs/blob/master/docs/core/tools/dotnet-nuget-push.md#examples
Actual behavior
The command is missing from the available options in the parser:
https://github.com/dotnet/cli/blob/485237a8a0c61c17858e88b9525d29e0fb426064/src/dotnet/commands/dotnet-nuget/NuGetCommandParser.cs#L50
The ability to set the config file is a pretty important requirement for CI systems that dump nuget credentials to a temporary file as they must appear in clear-text on non-windows platforms. The VSTS tasks do this today, for example, although they use the nuget xplat client directly:
https://github.com/Microsoft/vsts-tasks/blob/d2290c1a38f98a13af6e8e5c06430b498742c5a3/Tasks/NuGetPublisher/nugetpublisher.ts#L122
https://github.com/Microsoft/vsts-tasks/blob/d2290c1a38f98a13af6e8e5c06430b498742c5a3/Tasks/NuGetPublisher/nugetpublisher.ts#L140
https://github.com/Microsoft/vsts-tasks/blob/d2290c1a38f98a13af6e8e5c06430b498742c5a3/Tasks/NuGetPublisher/nugetpublisher.ts#L179
At any rate, if the dotnet-nuget command is forwarding arguments for everything else that the nuget client supports, it should also forward the config file argument. Someone thought of it, obviously, since its in the docs -- it just isn't supported by the dotnet-nuget command today.
Environment data
dotnet --infooutput:Copied from original issue: dotnet/cli#6123