FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix `ConciseView` to show Activity instead of myCommand by SteveL-MSFT · Pull Request #11007 · PowerShell/PowerShell · GitHub

Fix ConciseView to show Activity instead of myCommand - #11007

Merged
Ilya (iSazonov) merged 6 commits into
PowerShell:masterfrom
SteveL-MSFT:errorview-script
Nov 10, 2019
Merged

Fix ConciseView to show Activity instead of myCommand#11007
Ilya (iSazonov) merged 6 commits into
PowerShell:masterfrom
SteveL-MSFT:errorview-script

Conversation

Steve Lee (SteveL-MSFT) commented Nov 7, 2019
edited
Loading

Copy link
Copy Markdown
Member

PR Summary

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.

Before and after

PR Context

PR Checklist

Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Nov 10, 2019
Ilya (iSazonov) added this to the 7.0.0-preview.6 milestone Nov 10, 2019
Ilya (iSazonov) merged commit 2a45ccc into PowerShell:master Nov 10, 2019
Steve Lee (SteveL-MSFT) deleted the errorview-script branch November 11, 2019 17:06

Copy link
Copy Markdown

🎉v7.0.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
…1007)

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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL