diff --git a/.vscode/cspell.json b/.vscode/cspell.json index cf8fb666ce31..e1fdec8ef90b 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -267,6 +267,7 @@ "rwdlacu", "scbedd", "sdist", + "sdpath", "secbak", "SECG", "SECP", diff --git a/sdk/keyvault/test-resources-post.ps1 b/sdk/keyvault/test-resources-post.ps1 index ab925d71501c..41293487ad2f 100644 --- a/sdk/keyvault/test-resources-post.ps1 +++ b/sdk/keyvault/test-resources-post.ps1 @@ -95,7 +95,13 @@ if (Test-Path $sdpath) { Remove-Item $sdPath -Force } -Export-AzKeyVaultSecurityDomain -Name $hsmName -Quorum 2 -Certificates $wrappingFiles -OutputPath $sdPath +Export-AzKeyVaultSecurityDomain -Name $hsmName -Quorum 2 -Certificates $wrappingFiles -OutputPath $sdPath -ErrorAction SilentlyContinue -Verbose +if ( !$? ) { + Write-Host $Error[0].Exception + Write-Error $Error[0] + + exit +} Log "Security domain downloaded to '$sdPath'; Managed HSM is now active at '$hsmUrl'"