Skip to content

Commit bf53cb4

Browse files
azure-sdkbenbp
andauthored
Handle possible strict mode bugs (Azure#19550)
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
1 parent 89a45bd commit bf53cb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function Login([string]$subscription, [string]$clusterGroup, [switch]$pushImages
5656
$kubeContext = (RunOrExitOnFailure kubectl config view -o json) | ConvertFrom-Json -AsHashtable
5757
$defaultNamespace = $null
5858
$targetContext = $kubeContext.contexts.Where({ $_.name -eq $clusterName }) | Select -First 1
59-
if ($targetContext -ne $null) {
59+
if ($targetContext -ne $null -and $targetContext.PSObject.Properties.Name -match "namespace") {
6060
$defaultNamespace = $targetContext.context.namespace
6161
}
6262

0 commit comments

Comments
 (0)