Fix help text for dotnet-user-secrets-set to show the correct Windows example
This commit is contained in:
parent
6f1057a760
commit
cc84b8402d
|
|
@ -2,6 +2,7 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Microsoft.Extensions.CommandLineUtils;
|
using Microsoft.Extensions.CommandLineUtils;
|
||||||
using Microsoft.Extensions.Tools.Internal;
|
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.
|
This command will also handle piped input. Piped input is expected to be a valid JSON format.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
dotnet user-secrets set ConnStr ""User ID=bob;Password=***""
|
dotnet user-secrets set ConnStr ""User ID=bob;Password=***""";
|
||||||
cat secrets.json | dotnet user-secrets set
|
|
||||||
";
|
var catCmd = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||||
|
? @"type .\secrets.json"
|
||||||
|
: "cat ./secrets.json";
|
||||||
|
|
||||||
|
command.ExtendedHelpText += $@" {catCmd} | dotnet user-secrets set";
|
||||||
|
|
||||||
command.HelpOption();
|
command.HelpOption();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue