Commit graph

11 commits

Author SHA1 Message Date
Steve Lee 66912b7428
Fix unnecessary trimming of line resulting in incorrect indexi… (#11670) 2020-01-30 11:03:39 -08:00
xtqqczze 920b671fb4 Unify pester test syntax for the arguments of -BeOfType (#11558) 2020-01-24 11:00:37 -08:00
Ilya b221c2afa2
Correct pwsh run (#11486) 2020-01-05 12:17:41 +05:00
Steve Lee 5b42126f7c Don't format exceptions that aren't ErrorRecords (#11415)
* In one of the previous PRs for ConciseView, System.Exception was incorrectly added to the typenames handled by the ErrorRecord formatting. This results in just Exception objects written to the console to not be rendered since the ErrorRecord formatting didn't handle this situation. Fix is to remove the line to add that type putting it back to how it was previously. 

* Also made the handling of ErrorRecord a bit more robust just in case Exception.Message doesn't exist nor a Message property.
2019-12-21 09:45:44 +05:00
Steve Lee 563b1cba83 Add trailing line number to filename for ConciseView (#11391) 2019-12-18 14:05:56 -08:00
Steve Lee edd3e7680c Move Set-StrictMode to outer scriptblock for ErrorView (#11381) 2019-12-17 23:43:47 +05:00
Dongbo Wang 5605bf4195 Fix a regression in formatting caused by the FirstOrDefault primitive added in 7.0.0-Preview1 (#11258) 2019-12-11 15:37:18 -08:00
Steve Lee ed1f6e3144 Make approved features non-experimental (#11303) 2019-12-10 15:41:43 -08:00
Steve Lee 6e4da244c5 Update ConciseView to use TargetObject if applicable (#11075) 2019-12-10 09:50:51 -08:00
Steve Lee 2a45ccc787 Fix ConciseView to show Activity instead of myCommand (#11007)
ConciseView shows MyCommand as the prefix to the error message, but for a scriptblock, MyCommand is the whole scriptblock. Fix is to use CategoryInfo.Activity if available first. Also handle case where it's a script function by seeing if it's a command and showing MyCommand in that case rather than the Activity.
2019-11-10 16:21:10 +05:00
Steve Lee 8cf9c01800 Add ConciseView for $ErrorView (#10641) 2019-10-04 16:52:57 -07:00