-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
WG-Cmdlets-Corecmdlets in the Microsoft.PowerShell.Core modulecmdlets in the Microsoft.PowerShell.Core module
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
- Import a PowerShell module with a
DefaultCommandPrefixset in the.psdfile - As an example, use my module
totkeks.GitManagementfrom PowerShell gallery - Run command
Set-GitBaseDirectory
Source of the error from this PR #20409 (comment), where it is not checking for String.IsNullOrEmpty() anymore, instead using just null coalescing ??, which doesn't include String.Empty.
Expected behavior
* Commands are prefixed with the defined prefix, e.g. `Git`, and are working / found in the current scopeActual behavior
* Command not found, because the prefix was overwritten with an empty stringError details
Environment data
$PSVersionTable
Name Value
---- -----
PSVersion 7.6.0-preview.4
PSEdition Core
GitCommitId 7.6.0-preview.4
OS Microsoft Windows 10.0.26200
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
No response
Metadata
Metadata
Assignees
Labels
WG-Cmdlets-Corecmdlets in the Microsoft.PowerShell.Core modulecmdlets in the Microsoft.PowerShell.Core module