Skip to content
Snippets Groups Projects
Commit 22dc4eb1 authored by chrfranke's avatar chrfranke
Browse files

os_win32/update-smart-drivedb.ps1.in: Set console encoding.

Otherwise redirection to gpg occasionally starts with a BOM.

git-svn-id: https://svn.code.sf.net/p/smartmontools/code/trunk@5329 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent c6990751
Branches
No related tags found
No related merge requests found
......@@ -2,6 +2,9 @@ $Id$
2022-02-22 Christian Franke <franke@computer.org>
os_win32/update-smart-drivedb.ps1.in: Set console encoding.
Otherwise redirection to gpg occasionally starts with a BOM.
os_win32/update-smart-drivedb.ps1.in: Unify path syntax.
do_release: Update code signing key id.
......
......@@ -490,11 +490,15 @@ Q/qvYlwkbKOdlahjoHrFlkhADSBaO9N1OZp3OYDjziIujMdt2IPKnmM=
function run_join_out_err($cmd) # $arg1, $arg2, ...
{
$cmdobj = Get-Command -CommandType Application -Name $cmd
# Don't prepend $input with BOM
$enc = [Console]::InputEncoding
[Console]::InputEncoding = [System.Text.UTF8Encoding]::new()
$ErrorActionPreference = "Continue" # Don't abort command on first stderr output
$LASTEXITCODE = 42
# Run command and convert ErrorRecords from stderr to plain Strings
$($input | & $cmdobj @args 2>&1) | %{ $_.ToString() }
$ErrorActionPreference = "Stop"
[Console]::InputEncoding = $enc
}
function gpg_verify($ascfile, $file, [ref]$ok)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment