New-Alias
/ Set-Alias
shouldn't allow the alias target to be the same as the alias name.
#20153
Open
5 tasks done
Labels
Issue-Enhancement
the issue is more of a feature request than a bug
Needs-Triage
The issue is new and needs to be triaged by a work group.
WG-Cmdlets-Utility
cmdlets in the Microsoft.PowerShell.Utility module
Prerequisites
Steps to reproduce
Defining an alias whose target names is the same as the alias' itself makes no sense, yet:
Expected behavior
The
Set-Alias
call should fail.Actual behavior
The
Set-Alias
definition is quietly accepted.On trying to invoke the alias, a "is not recognized as a name of a cmdlet, function, script file, or executable program." error occurs.
Error details
No response
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: