Prerequisites
Steps to reproduce
Defining an alias whose target names is the same as the alias' itself makes no sense, yet:
- such a definition is currently quietly accepted.
- then fails on invocation.
# Note: 'oss' is a built-in *function*
Set-Alias oss oss
oss -?
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
PowerShell 7.4.0-preview.4
Visuals
No response
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-Aliascall should fail.Actual behavior
The
Set-Aliasdefinition 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