Skip to content

Commit 6d64079

Browse files
committed
defaulting of text parser regardless of mode
1 parent d15bbb9 commit 6d64079

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Readable, Writable } from 'stream'
66
import { writeFile, writeFileSync } from 'fs';
77
import { promisify } from 'util';
88

9+
910
function toArray<T>(source?:T|T[]):T[] {
1011
if (typeof source === 'undefined' || source === null) {
1112
return [];
@@ -135,7 +136,7 @@ export class PythonShell extends EventEmitter{
135136
this.mode = options.mode || 'text';
136137
this.formatter = resolve('format', options.formatter || this.mode);
137138
this.parser = resolve('parse', options.parser || this.mode);
138-
this.stderrParser = resolve('parse', options.stderrParser || this.mode);
139+
this.stderrParser = resolve('parse', options.stderrParser || 'text');
139140
this.terminated = false;
140141
this.childProcess = spawn(pythonPath, this.command, options);
141142

0 commit comments

Comments
 (0)