Skip to content

Commit d30f23c

Browse files
committed
Fix incorrect parameters
1 parent dffcaae commit d30f23c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

source/Modules/FileContentDsc.Common/FileContentDsc.Common.psm1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@ function Get-FileContent
256256

257257
if ($Encoding -like 'UTF8*')
258258
{
259-
$GetContentParam = 'UTF8'
259+
$GetContentParam.Encoding = 'UTF8'
260260
}
261261
elseif (-not [string]::IsNullOrEmpty($Encoding))
262262
{
263-
$GetContentParam = $Encoding
263+
$GetContentParam.Encoding = $Encoding
264264
}
265265

266266
Get-Content @GetContentParam
@@ -368,11 +368,11 @@ function Test-FileEncodingEqual
368368
[CmdletBinding()]
369369
[OutputType([bool])]
370370
param (
371-
[Parameter(Mandatory)]
371+
[Parameter(Mandatory = $true)]
372372
[System.String]
373373
$FileEncoding,
374374

375-
[Parameter(Mandatory)]
375+
[Parameter(Mandatory = $true)]
376376
[System.String]
377377
$ExpectedEncoding
378378
)

tests/Unit/FileContentDsc.Common.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ InModuleScope $script:subModuleName {
147147
},
148148
@{
149149
encoding = 'UTF8NoBOM'
150-
value = [byte[]](97, 98, 99, 226, 157, 164)
150+
value = [byte[]](97, 98, 99)
151151
expect = 'abc'
152152
},
153153
@{

0 commit comments

Comments
 (0)