Skip to content

Commit

Permalink
fix New-PACertificate not properly updating an existing order with up…
Browse files Browse the repository at this point in the history
…dated order params (#412)
  • Loading branch information
rmbolger committed Jan 4, 2022
1 parent ced3eb6 commit 3d6a623
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Posh-ACME/Public/Set-PAOrder.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,11 @@ function Set-PAOrder {

# update the current order ref if necessary
$curOrderFile = (Join-Path $acct.Folder 'current-order.txt')
if (($modCurrentOrder -or -not $NoSwitch) -and $order.Name -ne (Get-Content $curOrderFile -EA Ignore)) {
Write-Debug "Updating current-order.txt"
$order.Name | Out-File $curOrderFile -Force -EA Stop
if ($modCurrentOrder -or -not $NoSwitch) {
if ($order.Name -ne (Get-Content $curOrderFile -EA Ignore)) {
Write-Debug "Updating current-order.txt"
$order.Name | Out-File $curOrderFile -Force -EA Stop
}
$script:Order = $order
}

Expand Down

0 comments on commit 3d6a623

Please sign in to comment.