mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Implement SupportsShouldProcess in Stop-Transcript (#18731)
This commit is contained in:
1 parent
9cc914e1e5
commit
9d0bac5add
1 file changed
+6
-1
@@ -10,7 +10,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// <summary>
|
||||
/// Implements the stop-transcript cmdlet.
|
||||
/// </summary>
|
||||
[Cmdlet(VerbsLifecycle.Stop, "Transcript", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2096798")]
|
||||
[Cmdlet(VerbsLifecycle.Stop, "Transcript", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.None, HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2096798")]
|
||||
[OutputType(typeof(string))]
|
||||
public sealed class StopTranscriptCommand : PSCmdlet
|
||||
{
|
||||
@@ -21,6 +21,11 @@ namespace Microsoft.PowerShell.Commands
|
||||
void
|
||||
BeginProcessing()
|
||||
{
|
||||
if (!ShouldProcess(string.Empty))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
string outFilename = Host.UI.StopTranscribing();
|
||||
|
||||
Reference in new issue
Block a user