Fix help text for dotnet-user-secrets-set to show the correct Windows example

This commit is contained in:
Nate McMaster 2017-01-03 11:16:34 -08:00
parent 6f1057a760
commit cc84b8402d
1 changed files with 8 additions and 3 deletions

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.Extensions.CommandLineUtils;
using Microsoft.Extensions.Tools.Internal;
@ -18,9 +19,13 @@ Additional Info:
This command will also handle piped input. Piped input is expected to be a valid JSON format.
Examples:
dotnet user-secrets set ConnStr ""User ID=bob;Password=***""
cat secrets.json | dotnet user-secrets set
";
dotnet user-secrets set ConnStr ""User ID=bob;Password=***""";
var catCmd = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
? @"type .\secrets.json"
: "cat ./secrets.json";
command.ExtendedHelpText += $@" {catCmd} | dotnet user-secrets set";
command.HelpOption();