File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -351,16 +351,21 @@ function GetRawFile {
351
351
}
352
352
353
353
try {
354
- $result = $requestResult | Select-Object - Expand Content
354
+ $result = $requestResult.Content
355
+ $output = " "
355
356
# remove any empty lines or tabs in the result to prevent issues with parsing yaml
356
- $result = $result | Where-Object { $_.Trim ().Replace(" `t " , " " ) -ne " " }
357
+ foreach ($line in $result.Split ([Environment ]::NewLine)) {
358
+ $trimmedLine = $line.Trim ().Replace(" `t " , " " ).Replace(" " , " " )
359
+ if ($trimmedLine.Length -gt 0 ) {
360
+ $output += $line + [Environment ]::NewLine
361
+ }
362
+ }
363
+ return $output
357
364
}
358
365
catch {
359
366
Write-Warning " Error converting file content from url [$ ( $logUrl ) ]"
360
367
Write-Warning " Error: [$_ ]"
361
368
Write-Warning " Content: [$requestResult ]"
362
369
return " "
363
370
}
364
-
365
- return $result
366
371
}
You can’t perform that action at this time.
0 commit comments