File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
packages/build/src/extensions Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -133,10 +133,19 @@ export const run = async (scriptArgs: string[] = [], options: ExecaOptions = {})
133133 } ) ( pythonBin , scriptArgs ) ;
134134
135135 try {
136- assert ( ! result . failed , `Command failed: ${ result . stderr } ` ) ;
137- assert ( result . exitCode === 0 , `Non-zero exit code: ${ result . exitCode } ` ) ;
136+ assert ( ! result . failed , `Python command failed: ${ result . stderr } \nCommand: ${ result . command } ` ) ;
137+ assert (
138+ result . exitCode === 0 ,
139+ `Python command exited with non-zero code ${ result . exitCode } \nStdout: ${ result . stdout } \nStderr: ${ result . stderr } `
140+ ) ;
138141 } catch ( e ) {
139- logger . error ( e . message , result ) ;
142+ logger . error ( "Python command execution failed" , {
143+ error : e . message ,
144+ command : result . command ,
145+ stdout : result . stdout ,
146+ stderr : result . stderr ,
147+ exitCode : result . exitCode ,
148+ } ) ;
140149 throw e ;
141150 }
142151
@@ -160,7 +169,7 @@ export const runInline = async (scriptContent: string, options: ExecaOptions = {
160169 // Create a temporary file with restricted permissions
161170 const tmpFile = `/tmp/script_${ Date . now ( ) } .py` ;
162171 await fs . promises . writeFile ( tmpFile , scriptContent , { mode : 0o600 } ) ;
163-
172+
164173 try {
165174 return await runScript ( tmpFile , [ ] , options ) ;
166175 } finally {
You can’t perform that action at this time.
0 commit comments