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

Fix default formatting for deserialized MatchInfo by iSazonov · Pull Request #11728 · PowerShell/PowerShell · GitHub

Fix default formatting for deserialized MatchInfo - #11728

Merged
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
iSazonov:remoting-matchinfo
Mar 18, 2020
Merged

Fix default formatting for deserialized MatchInfo#11728
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
iSazonov:remoting-matchinfo

Conversation

Ilya (iSazonov) commented Jan 30, 2020
edited
Loading

Copy link
Copy Markdown
Collaborator

PR Summary

Fix #3480

MatchInfo class has ToEmphasizedString() member method to color output line.
In remote scenario MatchInfo class is deserialized as Deserialized.Microsoft.PowerShell.Commands.MatchInfo without the method. As result default formating in remote scenario show nothing.

The fix is to directly output Line property.

No tests are added because we haven't remote CI tests. Tested manually.

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 Jan 30, 2020
Ilya (iSazonov) added this to the 7.1.0-preview.1 milestone Jan 30, 2020
Ilya (iSazonov) self-assigned this Jan 30, 2020

Copy link
Copy Markdown
Contributor

Ilya (@iSazonov)
The cited issue doesn't seem to be related to this change. Please add repro steps that demonstrate the problem being fixed.

Copy link
Copy Markdown
Collaborator Author

Paul Higinbotham (@PaulHigin) I updated a link to the issue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Copy link
Copy Markdown
Collaborator

🤔 makes me wonder if we're not better off moving the emphasis method out of the MatchInfo class itself and make it a helper method on a utils class somewhere instead.

Copy link
Copy Markdown
Collaborator Author

Rain Sallow (/u/ta11ow) (@vexx32) The fix is simple and we could include it in 7.0.1.

Moving the emphasis method is more complex and we can break something. We need to think about this more.

Ilya (iSazonov) merged commit 43e0e1a into PowerShell:master Mar 18, 2020
Ilya (iSazonov) deleted the remoting-matchinfo branch March 18, 2020 13:43

Copy link
Copy Markdown

🎉v7.1.0-preview.1 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
MatchInfo class has ToEmphasizedString() member method to color output line.
In remote scenario MatchInfo class is deserialized as Deserialized.Microsoft.PowerShell.Commands.MatchInfo without the method. As result default formating in remote scenario show nothing.

The fix is to directly output Line property.
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.

Deserialized.Microsoft.PowerShell.Commands.MatchInfo not formatted correctly

4 participants


Back | FazBrowse Home | New Git URL