File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ function ConvertTo-SourceLineNumber {
5858 [PSCustomObject ]@ {
5959 PSTypeName = " BuildSourceMapping"
6060 SourceFile = $_.Matches [0 ].Groups[" SourceFile" ].Value.Trim(" '" )
61- StartLineNumber = $_.LineNumber
61+ StartLineNumber = [ System.Int32 ] $_.LineNumber
6262 # This offset is added when calculating the line number
6363 # because of the new line we're adding prior to the content
6464 # of each script file in the built module.
@@ -73,7 +73,7 @@ function ConvertTo-SourceLineNumber {
7373 # We need the match *before* the line we're searching for
7474 # And we need it as a zero-based index:
7575 # Cast $SourceLineNumber to the type of the first item in $hit.StartLineNumber
76- $index = -2 - [Array ]::BinarySearch($hit.StartLineNumber , $ ( $ SourceLineNumber -as $hit .StartLineNumber [ 0 ].GetType()) )
76+ $index = -2 - [Array ]::BinarySearch($hit.StartLineNumber , $SourceLineNumber )
7777 $Source = $hit [$index ]
7878
7979 if ($Passthru ) {
You can’t perform that action at this time.
0 commit comments