Skip to content

Fix ConciseView to show Activity instead of myCommand#11007

Merged
iSazonov merged 6 commits intoPowerShell:masterfrom
SteveL-MSFT:errorview-script
Nov 10, 2019
Merged

Fix ConciseView to show Activity instead of myCommand#11007
iSazonov merged 6 commits intoPowerShell:masterfrom
SteveL-MSFT:errorview-script

Conversation

@SteveL-MSFT
Copy link
Copy Markdown
Member

@SteveL-MSFT SteveL-MSFT commented Nov 7, 2019

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
img

PR Context

PR Checklist

@iSazonov 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
@iSazonov iSazonov added this to the 7.0.0-preview.6 milestone Nov 10, 2019
@iSazonov iSazonov merged commit 2a45ccc into PowerShell:master Nov 10, 2019
@SteveL-MSFT SteveL-MSFT deleted the errorview-script branch November 11, 2019 17:06
@ghost
Copy link
Copy Markdown

ghost commented Nov 21, 2019

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

Handy links:

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