Update New-Item unknown item type message by KirtiRamchandani · Pull Request #27522 · PowerShell/PowerShell
Summary
- Include
junctionandhardlinkin the file-system provider's unknownNew-Item -ItemTypeerror message - Add a regression assertion for the supported item-type list
Details
The filesystem provider already recognizes file, directory, symboliclink, junction, and hardlink, but the unknown-type error message still listed only the older three values.
Fixes #27248
Validation
Start-PSBuild -NoPSModuleRestore -CI -SkipExperimentalFeatureGeneration -UseNuGetOrg- Direct validation with the built
pwsh.exe:New-Item -ItemType UnknownTyperejects the type and the message includes bothjunctionandhardlink. - Added regression coverage for the supported item-type list.