Make user-secrets treat unmatched options as arguments (#18256)

This commit is contained in:
Kahbazi 2020-02-20 20:46:05 +03:30 committed by GitHub
parent 474d03c071
commit d597e08518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -19,7 +19,7 @@ namespace Microsoft.Extensions.SecretManager.Tools
public static CommandLineOptions Parse(string[] args, IConsole console)
{
var app = new CommandLineApplication()
var app = new CommandLineApplication(treatUnmatchedOptionsAsArguments: true)
{
Out = console.Out,
Error = console.Error,

View File

@ -93,7 +93,9 @@ namespace Microsoft.Extensions.SecretManager.Tools.Tests
new KeyValuePair<string, string>("key1", Guid.NewGuid().ToString()),
new KeyValuePair<string, string>("Facebook:AppId", Guid.NewGuid().ToString()),
new KeyValuePair<string, string>(@"key-@\/.~123!#$%^&*())-+==", @"key-@\/.~123!#$%^&*())-+=="),
new KeyValuePair<string, string>("key2", string.Empty)
new KeyValuePair<string, string>("key2", string.Empty),
new KeyValuePair<string, string>("-oneDashedKey", "-oneDashedValue"),
new KeyValuePair<string, string>("--twoDashedKey", "--twoDashedValue")
};
var projectPath = _fixture.GetTempSecretProject();