Skip to content

Commit a233063

Browse files
authored
fix: add stderr encoding for PowerShell session
Set encoding for stderr output to 'utf8'.
1 parent cdca4a7 commit a233063

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/commands/powershell.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const INIT_ELEMENT_TABLE = /* ps1 */ `$elementTable = New-Object System.Collecti
1414
export async function startPowerShellSession(this: NovaWindowsDriver): Promise<void> {
1515
const powerShell = spawn('powershell.exe', ['-NoExit', '-Command', '-']);
1616
powerShell.stdout.setEncoding('utf8');
17-
powerShell.stdout.setEncoding('utf8');
17+
powerShell.stderr.setEncoding('utf8');
1818

1919
powerShell.stdout.on('data', (chunk: any) => {
2020
this.powerShellStdOut += chunk.toString();

0 commit comments

Comments
 (0)