Commit Graph
12 Commits
Author SHA1 Message Date
Steve Lee 8830011b34 Fix ConciseView where error message is wider than window width and doesn't have whitespace (#11880)
# Conflicts:
#	src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs
#	test/powershell/engine/Formatting/ErrorView.Tests.ps1
2020-04-20 13:17:31 -07:00
Steve Lee f587d6a796 Fix ConciseView to not show the line information within the error messages (#11952) 2020-02-26 16:14:48 -08:00
Ilya ebf6abe294 Correct pwsh run (#11486)
# Conflicts:
#	test/powershell/Modules/Microsoft.PowerShell.Core/CompatiblePSEditions.Module.Tests.ps1
2020-02-10 13:16:15 -08:00
Steve Lee fe4e9f0141 Fix unnecessary trimming of line resulting in incorrect indexi… (#11670) 2020-02-10 13:12:08 -08:00
Steve Lee fdcf087654 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.
2020-01-09 15:59:06 -08:00
Steve Lee c9d64597af Add trailing line number to filename for ConciseView (#11391) 2020-01-09 15:57:25 -08:00
Steve Lee eb80aeaeae Move Set-StrictMode to outer scriptblock for ErrorView (#11381) 2020-01-09 15:40:53 -08:00
Dongbo Wang c4f0a13da0 Fix a regression in formatting caused by the FirstOrDefault primitive added in 7.0.0-Preview1 (#11258) 2019-12-12 16:50:07 -08:00
Steve Lee fee57e1cdc Make approved features non-experimental (#11303)
# Conflicts:
#	src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs
2019-12-10 16:05:15 -08:00
Steve Lee 899c3348a2 Update ConciseView to use TargetObject if applicable (#11075) 2019-12-10 16:03: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