X Tutup
The Wayback Machine - https://web.archive.org/web/20250731175311/https://github.com/PowerShell/PowerShell/pull/13623
Skip to content

Fix ConciseView for interactive advanced function writing error #13623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 14, 2020

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Sep 11, 2020

PR Summary

In the case where you interactively write to the console an advanced function that writes an error, that error doesn't get rendered. This is because in the ConciseView formatting, it doesn't correctly check if InvocationInfo.MyCommand.Name exists so it tries to find a command called $Null which fails.

Fix is to add check that InvocationInfo.MyCommand.Name exists.

PR Context

Fix #12727

PR Checklist

@kilasuit
Copy link
Collaborator

looks like this is a fix for #12727

@SteveL-MSFT
Copy link
Member Author

Thanks @kilasuit!

@anmenaga anmenaga added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Sep 14, 2020
@anmenaga anmenaga merged commit d25d964 into PowerShell:master Sep 14, 2020
@iSazonov iSazonov added this to the 7.1.0-RC.1 milestone Sep 14, 2020
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.

Error hidden when anonymous command uses WriteError
5 participants
X Tutup