diff --git a/Posh-ACME/Public/Set-PAOrder.ps1 b/Posh-ACME/Public/Set-PAOrder.ps1 index be293cc8..1671909c 100644 --- a/Posh-ACME/Public/Set-PAOrder.ps1 +++ b/Posh-ACME/Public/Set-PAOrder.ps1 @@ -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 }