Skip to content

Commit b39e0ab

Browse files
authored
Merge pull request #224 from AshleySetter/fix-error-passing-bug
Fix error passing bug
2 parents d15bbb9 + 80ff18a commit b39e0ab

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
@@ -135,7 +135,8 @@ export class PythonShell extends EventEmitter{
135135
this.mode = options.mode || 'text';
136136
this.formatter = resolve('format', options.formatter || this.mode);
137137
this.parser = resolve('parse', options.parser || this.mode);
138-
this.stderrParser = resolve('parse', options.stderrParser || this.mode);
138+
// We don't expect users to ever format stderr as JSON so we default to text 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)