mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
ConciseView shows MyCommand as the prefix to the error message, but for a scriptblock, MyCommand is the whole scriptblock. Fix is to use CategoryInfo.Activity if available first. Also handle case where it's a script function by seeing if it's a command and showing MyCommand in that case rather than the Activity.