Skip to content

Commit

Permalink
fix null reference (#1326)
Browse files Browse the repository at this point in the history
  • Loading branch information
VeryEarly committed Mar 26, 2024
1 parent d599838 commit f8ecbc6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ private string GetDefaultValuesStatements()
{
sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{");
sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false");
sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ $testPlayback = $testPlayback -or ('Microsoft.Message.ClientRuntime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }}");
sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Message.ClientRuntime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}");
sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{");
sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')");
sb.AppendLine($"{Indent}{Indent}{Indent}}} else {{");
Expand Down

0 comments on commit f8ecbc6

Please sign in to comment.