Skip to content

Commit

Permalink
Fix incorrect parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mkht committed Oct 27, 2024
1 parent dffcaae commit d30f23c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ function Get-FileContent

if ($Encoding -like 'UTF8*')
{
$GetContentParam = 'UTF8'
$GetContentParam.Encoding = 'UTF8'
}
elseif (-not [string]::IsNullOrEmpty($Encoding))
{
$GetContentParam = $Encoding
$GetContentParam.Encoding = $Encoding
}

Get-Content @GetContentParam
Expand Down Expand Up @@ -368,11 +368,11 @@ function Test-FileEncodingEqual
[CmdletBinding()]
[OutputType([bool])]
param (
[Parameter(Mandatory)]
[Parameter(Mandatory = $true)]
[System.String]
$FileEncoding,

[Parameter(Mandatory)]
[Parameter(Mandatory = $true)]
[System.String]
$ExpectedEncoding
)
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/FileContentDsc.Common.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ InModuleScope $script:subModuleName {
},
@{
encoding = 'UTF8NoBOM'
value = [byte[]](97, 98, 99, 226, 157, 164)
value = [byte[]](97, 98, 99)
expect = 'abc'
},
@{
Expand Down

0 comments on commit d30f23c

Please sign in to comment.