Skip to content

Commit

Permalink
Small path fix for Load Certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
saimachi committed Dec 18, 2024
1 parent 6c40567 commit 400b405
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions deploy/standard/azd-hooks/utility/Load-Certificates.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ foreach ($certificateFolder in $certificates) {
$keyName = $certificateFolder

$password = Read-Host "Enter password for $($pfx.FullName) certificate (Enter for none): " -AsSecureString
if ([string]::IsNullOrWhitespace($password))
if ($password.Length -eq 0)
{
Invoke-AndRequireSuccess "Load PFX Certificate $($certificateFolder) into Azure Key Vault" {
az keyvault certificate import `
--file $pfx.FullName `
--file $pfx `
--name $keyName `
--vault-name $keyVaultName
}
Expand All @@ -35,7 +35,7 @@ foreach ($certificateFolder in $certificates) {
{
Invoke-AndRequireSuccess "Load PFX Certificate $($certificateFolder) into Azure Key Vault" {
az keyvault certificate import `
--file $pfx.FullName `
--file $pfx `
--name $keyName `
--vault-name $keyVaultName `
--password $password
Expand Down

0 comments on commit 400b405

Please sign in to comment.