◐ Shell
clean mode source ↗

Update New-Item unknown item type message by KirtiRamchandani · Pull Request #27522 · PowerShell/PowerShell

Summary

  • Include junction and hardlink in the file-system provider's unknown New-Item -ItemType error 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 UnknownType rejects the type and the message includes both junction and hardlink.
  • Added regression coverage for the supported item-type list.