Explorar el Código

add error handler on CommandRunner

Henry Oswald hace 10 años
padre
commit
d140964c5f
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      services/clsi/app/coffee/CommandRunner.coffee

+ 3 - 0
services/clsi/app/coffee/CommandRunner.coffee

@@ -8,5 +8,8 @@ module.exports = CommandRunner =
 		logger.warn "timeouts and sandboxing are not enabled with CommandRunner"
 
 		proc = spawn command[0], command.slice(1), stdio: "inherit", cwd: directory
+		proc.on "error", (err)->
+			logger.err err:err, project_id:project_id, command: command, directory: directory, "error running command"
+			callback(err)
 		proc.on "close", () ->
 			callback()