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 {
8686 }
8787}
8888
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" ;
9491
9592 logger . debug (
96- `Running python: \t${ cmd } ${ options . input ? `(with stdin)` : "" } ` ,
93+ `Running ${ pythonBin } \t${ JSON . stringify ( scriptArgs ) } ${ options . input ? `(with stdin)` : "" } ` ,
9794 options
9895 ) ;
9996
10097 const result = await $ ( {
10198 shell : true ,
10299 ...options ,
103- } ) ` ${ cmd } ` ;
100+ } ) ( pythonBin , ... scriptArgs ) ;
104101
105102 try {
106103 assert ( ! result . failed , `Command failed: ${ result . stderr } ` ) ;
You can’t perform that action at this time.
0 commit comments