mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
For ConciseView, show line context information if multiple lines but no scriptname (#10746)
This commit is contained in:
1 parent
273b4abd40
commit
36bc894d9b
1 file changed
+1
-1
+1
-1
@@ -879,7 +879,7 @@ namespace System.Management.Automation.Runspaces
|
||||
$prefix = ''
|
||||
$newline = [Environment]::Newline
|
||||
|
||||
if ($myinv -and $myinv.ScriptName -or $_.CategoryInfo.Category -eq 'ParserError') {
|
||||
if ($myinv -and $myinv.ScriptName -or $myinv.ScriptLineNumber -gt 1 -or $_.CategoryInfo.Category -eq 'ParserError') {
|
||||
if ($myinv.ScriptName) {
|
||||
$posmsg = ""${resetcolor}$($myinv.ScriptName)${newline}""
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user