Skip to content

Incorrect resolution in preprovision.ps1 #29

Description

@christwinn

If we are not logged into Azure then 'azd up' fails with: [ERROR] Not logged in to Azure. Run 'azd auth login'
I ran 'azd auth login', logged in, same error.
I verified my 'azd auth status' which returned 'Logged into Azure as @'

The instructions to resolve are incorrect. preprovision.ps1 is calling 'az account show' but advising to login to azd.

deployment/hooks/preprovision.ps1 [line 20-24]
$account = az account show 2>$null | ConvertFrom-Json
if (-not $account) {
Write-Host "[ERROR] Not logged in to Azure. Run 'azd auth login'" -ForegroundColor Red
exit 1
}

Realised this should say:
Write-Host "[ERROR] Not logged in to Azure. Run 'az login'" -ForegroundColor Red

Ran that and voila.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions