Skip to content

Conversation

@iSazonov
Copy link
Collaborator

@iSazonov iSazonov commented Jan 30, 2020

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

@iSazonov 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
@iSazonov iSazonov added this to the 7.1.0-preview.1 milestone Jan 30, 2020
@iSazonov iSazonov self-assigned this Jan 30, 2020
@iSazonov iSazonov force-pushed the remoting-matchinfo branch from d82d80e to dc8ffba Compare March 9, 2020 17:35
@SteveL-MSFT SteveL-MSFT requested a review from PaulHigin March 9, 2020 17:52
@PaulHigin
Copy link
Contributor

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

@iSazonov
Copy link
Collaborator Author

iSazonov commented Mar 9, 2020

@PaulHigin I updated a link to the issue.

Copy link
Contributor

@PaulHigin PaulHigin left a comment

Choose a reason for hiding this comment

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

LGTM

@vexx32
Copy link
Collaborator

vexx32 commented Mar 10, 2020

🤔 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.

@iSazonov
Copy link
Collaborator Author

@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.

@iSazonov iSazonov merged commit 43e0e1a into PowerShell:master Mar 18, 2020
@iSazonov iSazonov deleted the remoting-matchinfo branch March 18, 2020 13:43
@ghost
Copy link

ghost commented Mar 26, 2020

🎉v7.1.0-preview.1 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.

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

4 participants