Steps to reproduce
- Install powershell core via the dotnet global tool utility:
dotnet tool install --global PowerShell
- run the new powershell command with the "Working Directory" option/flag:
Expected behavior
It is expected that this option works and the shell starts in the provided directory.
Actual behavior
The following error is thrown
-WorkingDirectory : The term '-WorkingDirectory' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.At line:1 char:1
+ -WorkingDirectory ~
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (-WorkingDirectory:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Environment data
Running install and pwsh command in:
Name Value
---- -----
PSVersion 5.1.18362.145
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Installed pwsh (installed as global tool):
Name Value
---- -----
PSVersion 6.2.2
PSEdition Core
GitCommitId 6.2.2
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Steps to reproduce
dotnet tool install --global PowerShellpwsh -WorkingDirectory ~Expected behavior
It is expected that this option works and the shell starts in the provided directory.
Actual behavior
The following error is thrown
Environment data
Running install and pwsh command in:
Installed pwsh (installed as global tool):