mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-26 18:41:52 -08:00
fix(pwsh): validate correct AZ context object
This commit is contained in:
parent
ba71a4a16d
commit
aa5a235953
|
@ -58,7 +58,7 @@ function global:Initialize-ModuleSupport {
|
|||
if ($env:AZ_ENABLED -eq $true) {
|
||||
try {
|
||||
$context = Get-AzContext
|
||||
if ($null -ne $subscription) {
|
||||
if ($null -ne $context) {
|
||||
$env:AZ_ENVIRONMENT_NAME = $context.Environment.Name
|
||||
$env:AZ_USER_NAME = $context.Account.Id
|
||||
$env:AZ_SUBSCRIPTION_ID = $context.Subscription.Id
|
||||
|
|
Loading…
Reference in a new issue