Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Explicitly specify ErrorRecord to use in DetailedView error format script#25627

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
MatejKafka wants to merge2 commits intoPowerShell:master
base:master
Choose a base branch
Loading
fromMatejKafka:detailed-view-format

Conversation

MatejKafka
Copy link
Contributor

PR Summary

Previously, formatting forDetailedView of error records inOut-Default calledGet-Error without parameters, which picked up the last thrown error instead of the actually passedErrorRecord. This PR explicitly passes the formattedErrorRecord toGet-Error.

PR Context

Currently, if you try to overrideOut-Default and then use.GetSteppablePipeline() to call the originalOut-Default, errors are not printed at all when inDetailedView. Not entirely sure why, but this change fixes it, and the current code is pretty obviously incorrect.

PR Checklist

@microsoft-github-policy-servicemicrosoft-github-policy-servicebot added the Review - NeededThe PR is being reviewed labelJun 9, 2025
@iSazonoviSazonov added the CL-GeneralIndicates that a PR should be marked as a general cmdlet change in the Change Log labelJun 9, 2025
@MatejKafka
Copy link
ContributorAuthor

@iSazonov Afaict, this PR has been approved and ready to merge, is there anything I need to do on my end to get it merged?

@iSazonov
Copy link
Collaborator

@MatejKafka Could you please add new simple test?

@microsoft-github-policy-servicemicrosoft-github-policy-servicebot removed the Review - NeededThe PR is being reviewed labelJun 30, 2025
@MatejKafkaMatejKafkaforce-pushed thedetailed-view-format branch 2 times, most recently fromd249716 tof9ad262CompareJuly 1, 2025 22:50
@MatejKafka
Copy link
ContributorAuthor

@iSazonov Added a test and cleaned up the test file a bit.

@iSazonov
Copy link
Collaborator

@MatejKafka Please remove all unrelated changes - it saves reviewer's time.

@MatejKafka
Copy link
ContributorAuthor

@iSazonov Moved to a separate PR.

@@ -211,5 +211,14 @@ Describe 'Tests for $ErrorView' -Tag CI {

$e | Should -BeExactly (Get-Error | Out-String).Trim([Environment]::NewLine.ToCharArray())
}

It 'Renders the passed error instead of the last one' {
# PR #25627
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# PR #25627

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Why remove the comment? It is useful to get more context as to why such a weird behavior is even tested.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We never add such comments.

@microsoft-github-policy-servicemicrosoft-github-policy-servicebot added the Review - NeededThe PR is being reviewed labelJul 11, 2025
@microsoft-github-policy-serviceMicrosoft GitHub Policy Service
Copy link
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for7 days.
Maintainer, please provide feedback and/or mark it asWaiting on Author

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@iSazonoviSazonoviSazonov approved these changes

@MartinGC94MartinGC94MartinGC94 left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
CL-GeneralIndicates that a PR should be marked as a general cmdlet change in the Change LogReview - NeededThe PR is being reviewed
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@MatejKafka@iSazonov@MartinGC94

[8]ページ先頭

©2009-2025 Movatter.jp