Skip to content

Commit 66f7667

Browse files
committed
Write-ProgressIndicator and Write-ProgressIndicatorEnd do no longer write to the screen, if for the calling function NoDisplay was specified
1 parent b82fbd5 commit 66f7667

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

PSLog/PSLog.psm1

+10
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,11 @@ function Get-CallerPreference
10741074
function Write-ProgressIndicator
10751075
{
10761076
# .ExternalHelp AutomatedLab.Help.xml
1077+
1078+
if ((Get-PSCallStack)[1].InvocationInfo.BoundParameters['NoDisplay'].IsPresent)
1079+
{
1080+
return
1081+
}
10771082
Write-ScreenInfo -Message '.' -NoNewline
10781083
}
10791084
#endregion Write-ProgressIndicator
@@ -1082,6 +1087,11 @@ function Write-ProgressIndicator
10821087
function Write-ProgressIndicatorEnd
10831088
{
10841089
# .ExternalHelp AutomatedLab.Help.xml
1090+
1091+
if ((Get-PSCallStack)[1].InvocationInfo.BoundParameters['NoDisplay'].IsPresent)
1092+
{
1093+
return
1094+
}
10851095
Write-ScreenInfo -Message '.'
10861096
}
10871097
#endregion Write-ProgressIndicatorEnd

0 commit comments

Comments
 (0)