powerShell() fix UTF8 output (windows)

This commit is contained in:
Sebastian Hildebrandt
2026-01-15 20:27:18 +01:00
parent 12455253dd
commit 953a6fa026
4 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -479,7 +479,7 @@ function powerShell(cmd) {
const spanOptions =
osVersion[0] < 10
? ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-NoExit', '-ExecutionPolicy', 'Unrestricted', '-Command', '-']
: ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-ExecutionPolicy', 'Unrestricted', '-Command', cmd];
: ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-ExecutionPolicy', 'Unrestricted', '-Command', _psToUTF8 + cmd];
const child = spawn(_powerShell, spanOptions, {
stdio: 'pipe',
windowsHide: true,