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

Move Set-StrictMode to outer scriptblock for ErrorView by SteveL-MSFT · Pull Request #11381 · PowerShell/PowerShell · GitHub

Move Set-StrictMode to outer scriptblock for ErrorView - #11381

Merged
Ilya (iSazonov) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:errorview-strictmode
Dec 17, 2019
Merged

Move Set-StrictMode to outer scriptblock for ErrorView#11381
Ilya (iSazonov) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:errorview-strictmode

Conversation

Steve Lee (SteveL-MSFT) commented Dec 17, 2019
edited
Loading

Copy link
Copy Markdown
Member

PR Summary

The NormalView code tries to use a member that may not exist. So when using strict mode, this line fails and so nothing is returned to the user as an exception is thrown in the formatter. Fix is to move the call to turn off strict mode from the helper function to the outer script block.

PR Context

Fix #11371

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 Dec 17, 2019
Ilya (iSazonov) merged commit edd3e76 into PowerShell:master Dec 17, 2019
Steve Lee (SteveL-MSFT) deleted the errorview-strictmode branch December 17, 2019 19:04

Copy link
Copy Markdown

🎉v7.0.0-rc.2 has been released which incorporates this pull request.:tada:

Handy links:

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.

v7.0.0-rc.1 regression - error on error formatting with strict mode and $ErrorView = 'NormalView'

5 participants


Back | FazBrowse Home | New Git URL