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 {
58
58
[PSCustomObject ]@ {
59
59
PSTypeName = " BuildSourceMapping"
60
60
SourceFile = $_.Matches [0 ].Groups[" SourceFile" ].Value.Trim(" '" )
61
- StartLineNumber = $_.LineNumber
61
+ StartLineNumber = [ System.Int32 ] $_.LineNumber
62
62
# This offset is added when calculating the line number
63
63
# because of the new line we're adding prior to the content
64
64
# of each script file in the built module.
@@ -73,7 +73,7 @@ function ConvertTo-SourceLineNumber {
73
73
# We need the match *before* the line we're searching for
74
74
# And we need it as a zero-based index:
75
75
# 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 )
77
77
$Source = $hit [$index ]
78
78
79
79
if ($Passthru ) {
You can’t perform that action at this time.
0 commit comments