File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
source/Module/STIG/Convert Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## [ Unreleased]
4
4
5
+ * PowerSTIG Convert should add newline to raw Xccdf to ensure Pester tests Pass : [ #1118 ] ( https://github.com/microsoft/PowerStig/issues/1118 )
6
+
5
7
## [ 4.13.1] - 2022-06-27
6
8
7
9
* Fixed: Split-BenchmarkId returns the wrong value for Windows Defender V2R4 [ #1121 ] ( https://github.com/microsoft/PowerStig/issues/1121 )
Original file line number Diff line number Diff line change @@ -249,6 +249,16 @@ function ConvertTo-PowerStigXml
249
249
{
250
250
$convertedStigObjects = ConvertFrom-StigXccdf - Path $Path - RuleIdFilter $RuleIdFilter
251
251
252
+ # Add a newline to end of raw xccdf if it doesn't exist
253
+ $rawXccdf = Get-Content - Path $Path
254
+ $fileLength = $rawXccdf.Length
255
+ $lastLine = $rawXccdf [$fileLength - 1 ]
256
+
257
+ if ($lastline -ne ' ' )
258
+ {
259
+ Add-Content - Path $path - Value ' '
260
+ }
261
+
252
262
# Get the raw xccdf xml to pull additional details from the root node.
253
263
[xml ] $xccdfXml = Get-Content - Path $Path - Encoding UTF8
254
264
[version ] $stigVersionNumber = Get-StigVersionNumber - StigDetails $xccdfXml
You can’t perform that action at this time.
0 commit comments