Skip to content

Commit

Permalink
Fix hashtable format.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkht committed Jan 24, 2021
1 parent b5cba35 commit d419976
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,15 @@ function Get-FileEncoding
# The parameter for reading a file as a byte stream are different between PSv6 and later and earlier.
$ByteParam = if ($PSVersionTable.PSVersion.Major -ge 6)
{
@{AsByteStream = $true }
@{
AsByteStream = $true
}
}
else
{
@{Encoding = 'byte' }
@{
Encoding = 'byte'
}
}

[System.Byte[]] $byte = Get-Content @ByteParam -ReadCount 4 -TotalCount 4 -Path $Path
Expand Down

0 comments on commit d419976

Please sign in to comment.