You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Obviously, the whole point of the module is for the ErrorView to be easy to customize, and I think it already is:
Write a function ConvertTo-WhateverErrorview that takes n $InputObject parameter of type [System.Management.Automation.ErrorRecord]
Call Set-ErrorView Whatever or Import-Module ErrorView -Args Whatever
Additionally, the module already supports an ErrorView argument at import, and although it would be simple to make that consider an environment variable, I'm not sure I see the need, since you have to define a function anyway.
I can't imagine any useful way to format an error with a single string, so would you care to give an example?
It would be nice if the error view was easy to customize.
Here's a slight suggestion as to how:
If
$env:ErrorView
is set, it should be treated as an expandable PowerShell string.If it is present, it should take precedence over #2 and #3 .
The text was updated successfully, but these errors were encountered: