From d1ce43b9a75026f4f5a73be3584d933eedf63f36 Mon Sep 17 00:00:00 2001 From: Freddy Kristiansen Date: Wed, 26 Jun 2024 07:18:58 +0200 Subject: [PATCH] End 2 End test failure (#1121) This fix https://github.com/microsoft/AL-Go/pull/1118 introduced a bug, causing an end 2 end test failure Co-authored-by: freddydk --- Actions/Deliver/Deliver.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Actions/Deliver/Deliver.ps1 b/Actions/Deliver/Deliver.ps1 index 9b1f1bc35..0d22b793d 100644 --- a/Actions/Deliver/Deliver.ps1 +++ b/Actions/Deliver/Deliver.ps1 @@ -484,8 +484,10 @@ try { } Write-Host "Submitting to AppSource" $status = New-AppSourceSubmission -authContext $authContext -productId $projectSettings.deliverToAppSource.productId -appFile $appFile -libraryAppFiles $libraryAppFiles -doNotWait -autoPromote:$goLive -Force - if ($status.state -ne 'Published' -or ($status.substate -ne 'ReadyToPublish' -and $status.substate -ne 'InStore')) { - throw "AppSource submission failed. Status is $($status.state/$status.substate)" + if ($goLive) { + if ($status.state -ne 'Published' -or ($status.substate -ne 'ReadyToPublish' -and $status.substate -ne 'InStore')) { + throw "AppSource submission failed. Status is $($status.state)/$($status.substate)" + } } } }