File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,14 +162,15 @@ export class PythonShell extends EventEmitter {
162162 let pythonOptions = toArray ( options . pythonOptions ) ;
163163 let scriptArgs = toArray ( options . args ) ;
164164
165- this . scriptPath = join ( options . scriptPath || '' , scriptPath ) ;
165+ this . scriptPath = scriptPath ;
166166 this . command = pythonOptions . concat ( this . scriptPath , scriptArgs ) ;
167167 this . mode = options . mode || 'text' ;
168168 this . formatter = resolve ( 'format' , options . formatter || this . mode ) ;
169169 this . parser = resolve ( 'parse' , options . parser || this . mode ) ;
170170 // We don't expect users to ever format stderr as JSON so we default to text mode
171171 this . stderrParser = resolve ( 'parse' , options . stderrParser || 'text' ) ;
172172 this . terminated = false ;
173+ options . cwd = options . scriptPath ;
173174 this . childProcess = spawn ( pythonPath , this . command , options ) ;
174175
175176 [ 'stdout' , 'stdin' , 'stderr' ] . forEach ( function ( name ) {
You can’t perform that action at this time.
0 commit comments