Skip to content

Commit 65eebfa

Browse files
fix: improve web app URL retrieval in postprovision hooks
1 parent 59b9f46 commit 65eebfa

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

azure.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ hooks:
5252
}
5353
5454
Write-Host ""
55+
$webAppUrl = $env:WEB_APP_URL
56+
if ([string]::IsNullOrWhiteSpace($webAppUrl)) { $webAppUrl = azd env get-value WEB_APP_URL 2>$null }
5557
Write-Host "Web app URL: " -NoNewline
56-
Write-Host "$env:WEB_APP_URL" -ForegroundColor Cyan
58+
Write-Host "$webAppUrl" -ForegroundColor Cyan
5759
shell: pwsh
5860
continueOnError: false
5961
interactive: true
@@ -63,7 +65,9 @@ hooks:
6365
echo "=> Next step: build and push container images to the dedicated ACR (remote build):"
6466
echo " bash scripts/build_and_push_images.sh"
6567
echo ""
66-
echo "Web app URL: $WEB_APP_URL"
68+
WEB_APP_URL_DISPLAY="$WEB_APP_URL"
69+
if [ -z "$WEB_APP_URL_DISPLAY" ]; then WEB_APP_URL_DISPLAY=$(azd env get-value WEB_APP_URL 2>/dev/null); fi
70+
echo "Web app URL: $WEB_APP_URL_DISPLAY"
6771
shell: sh
6872
continueOnError: false
6973
interactive: true

0 commit comments

Comments
 (0)