Bugfix: fixes new-alias bug when debugging powershell (#17816)

This commit is contained in:
Trond Hindenes 2016-09-30 18:46:06 +02:00 committed by Matt Davis
parent c6fa701ab1
commit 35fba5718d

View file

@ -154,8 +154,12 @@ Function Get-AnsibleParam($obj, $name, $default = $null, $resultobj, $failifempt
}
}
#Alias Get-attr-->Get-AnsibleParam for backwards compat.
New-Alias -Name Get-attr -Value Get-AnsibleParam
#Alias Get-attr-->Get-AnsibleParam for backwards compat. Only add when needed to ease debugging of scripts
If (!(Get-Alias -Name "Get-attr" -ErrorAction SilentlyContinue))
{
New-Alias -Name Get-attr -Value Get-AnsibleParam
}
# Helper filter/pipeline function to convert a value to boolean following current
# Ansible practices