Caching cleanup
							parent
							
								
									212c29e52a
								
							
						
					
					
						commit
						19be95bef3
					
				|  | @ -2615,7 +2615,7 @@ class CloudRunnerLogger { | |||
|             return; | ||||
|         } | ||||
|         CloudRunnerLogger.log(`STARTING INIT HOOK ${process.env.INIT_HOOK}`); | ||||
|         child_process_1.exec(process.env.INIT_HOOK, (error, stdout, stderr) => { | ||||
|         const child = child_process_1.exec(process.env.INIT_HOOK, (error, stdout, stderr) => { | ||||
|             if (error) { | ||||
|                 CloudRunnerLogger.error(`[GCP-LOGGER][ERROR]${JSON.stringify(error)}`); | ||||
|                 return; | ||||
|  | @ -2626,6 +2626,12 @@ class CloudRunnerLogger { | |||
|             } | ||||
|             CloudRunnerLogger.log(`[GCP-LOGGER]${stdout}`); | ||||
|         }); | ||||
|         child.on('close', function (code) { | ||||
|             CloudRunnerLogger.log(`[GCP-LOGGER][Exit code ${code}]`); | ||||
|             if (code !== 0) { | ||||
|                 throw new Error(`${code}`); | ||||
|             } | ||||
|         }); | ||||
|     } | ||||
| } | ||||
| exports.default = CloudRunnerLogger; | ||||
|  |  | |||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -51,7 +51,7 @@ class CloudRunnerLogger { | |||
|       return; | ||||
|     } | ||||
|     CloudRunnerLogger.log(`STARTING INIT HOOK ${process.env.INIT_HOOK}`); | ||||
|     exec(process.env.INIT_HOOK, (error: any, stdout: string, stderr: any) => { | ||||
|     const child = exec(process.env.INIT_HOOK, (error: any, stdout: string, stderr: any) => { | ||||
|       if (error) { | ||||
|         CloudRunnerLogger.error(`[GCP-LOGGER][ERROR]${JSON.stringify(error)}`); | ||||
|         return; | ||||
|  | @ -62,6 +62,12 @@ class CloudRunnerLogger { | |||
|       } | ||||
|       CloudRunnerLogger.log(`[GCP-LOGGER]${stdout}`); | ||||
|     }); | ||||
|     child.on('close', function (code) { | ||||
|       CloudRunnerLogger.log(`[GCP-LOGGER][Exit code ${code}]`); | ||||
|       if (code !== 0) { | ||||
|         throw new Error(`${code}`); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
| } | ||||
| export default CloudRunnerLogger; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue