File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
packages/build/src/extensions Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -86,21 +86,18 @@ class PythonExtension implements BuildExtension {
86
86
}
87
87
}
88
88
89
- export const run = async (
90
- args ?: string ,
91
- options : Parameters < typeof $ > [ 1 ] = { }
92
- ) => {
93
- const cmd = `${ process . env . PYTHON_BIN_PATH || "python" } ${ args } ` ;
89
+ export const run = async ( scriptArgs : string [ ] = [ ] , options : Parameters < typeof $ > [ 1 ] = { } ) => {
90
+ const pythonBin = process . env . PYTHON_BIN_PATH || "python" ;
94
91
95
92
logger . debug (
96
- `Running python: \t${ cmd } ${ options . input ? `(with stdin)` : "" } ` ,
93
+ `Running ${ pythonBin } \t${ JSON . stringify ( scriptArgs ) } ${ options . input ? `(with stdin)` : "" } ` ,
97
94
options
98
95
) ;
99
96
100
97
const result = await $ ( {
101
98
shell : true ,
102
99
...options ,
103
- } ) ` ${ cmd } ` ;
100
+ } ) ( pythonBin , ... scriptArgs ) ;
104
101
105
102
try {
106
103
assert ( ! result . failed , `Command failed: ${ result . stderr } ` ) ;
You can’t perform that action at this time.
0 commit comments