Skip to content

Commit 94b7eb6

Browse files
committed
reverting ed64700 due to breaking changes - postponing til v2 release
1 parent 561b1d6 commit 94b7eb6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export interface Options extends SpawnOptions{
4040
*/
4141
pythonOptions?: string[]
4242
/**
43-
* the scriptPath passed to PythonShell is executed relative to scriptFolder, if specified
43+
* overrides scriptPath passed into PythonShell constructor
4444
*/
45-
scriptFolder?: string
45+
scriptPath?: string
4646
/**
4747
* arguments to your program
4848
*/
@@ -120,7 +120,7 @@ export class PythonShell extends EventEmitter{
120120
let pythonOptions = toArray(options.pythonOptions);
121121
let scriptArgs = toArray(options.args);
122122

123-
this.scriptPath = join(options.scriptFolder || '', scriptPath);
123+
this.scriptPath = join(options.scriptPath || '', scriptPath);
124124
this.command = pythonOptions.concat(this.scriptPath, scriptArgs);
125125
this.mode = options.mode || 'text';
126126
this.formatter = resolve('format', options.formatter || this.mode);

test/test-python-shell.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('PythonShell', function () {
99
const pythonFolder = 'test/python'
1010

1111
PythonShell.defaultOptions = {
12-
scriptFolder: pythonFolder
12+
scriptPath: pythonFolder
1313
};
1414

1515
describe('#ctor(script, options)', function () {
@@ -39,7 +39,7 @@ describe('PythonShell', function () {
3939

4040
//reset values to intial status
4141
PythonShell.defaultOptions = {
42-
scriptFolder: pythonFolder
42+
scriptPath: pythonFolder
4343
};
4444
chdir(originalDirectory)
4545
});
@@ -101,7 +101,7 @@ describe('PythonShell', function () {
101101
after(()=>{
102102
PythonShell.defaultOptions = {
103103
// reset to match initial value
104-
scriptFolder: pythonFolder
104+
scriptPath: pythonFolder
105105
};
106106
})
107107
});

0 commit comments

Comments
 (0)