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

pull/4420/head
Trond Hindenes 2016-09-30 18:46:06 +02:00 committed by Matt Davis
parent c6fa701ab1
commit 35fba5718d
1 changed files with 6 additions and 2 deletions

View File

@ -154,8 +154,12 @@ Function Get-AnsibleParam($obj, $name, $default = $null, $resultobj, $failifempt
} }
} }
#Alias Get-attr-->Get-AnsibleParam for backwards compat. #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 New-Alias -Name Get-attr -Value Get-AnsibleParam
}
# Helper filter/pipeline function to convert a value to boolean following current # Helper filter/pipeline function to convert a value to boolean following current
# Ansible practices # Ansible practices