Skip to content

Commit

Permalink
Fix ConciseView to split PositionMessage using `[Environment]::Ne…
Browse files Browse the repository at this point in the history
…wLine` (#12010)
  • Loading branch information
daxian-dbw committed Mar 4, 2020
1 parent 819585c commit 348ca85
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -1100,8 +1100,7 @@ private static IEnumerable<FormatViewDefinition> ViewsOf_System_Management_Autom
$offsetInLine = 0
}
else {
# use newline char instead of $newline because that is what is in the message
$positionMessage = $myinv.PositionMessage.Split(""`n"")
$positionMessage = $myinv.PositionMessage.Split($newline)
$line = $positionMessage[1].Substring(1) # skip the '+' at the start
$highlightLine = $positionMessage[$positionMessage.Count - 1].Substring(1)
$offsetLength = $highlightLine.Trim().Length
Expand Down

0 comments on commit 348ca85

Please sign in to comment.