mirror of
https://github.com/mrclay/minify.git
synced 2025-08-10 16:14:18 +02:00
Handle Nailgun specific return code
This commit is contained in:
@@ -64,7 +64,11 @@ class Minify_FastClosureCompiler {
|
||||
file_put_contents($tmpFile, $js);
|
||||
exec(self::_getCmd($options, $tmpFile), $output, $result_code);
|
||||
unlink($tmpFile);
|
||||
if ($result_code != 0) {
|
||||
// For some reasons Nailgun thinks that it's server
|
||||
// broke the connection and returns 227 instead of 0
|
||||
// We'll just handle this here instead of fixing
|
||||
// the nailgun client itself.
|
||||
if ($result_code != 0 || $result_code != 227) {
|
||||
throw new Exception('Minify_FastClosureCompiler : Closure Compiler execution failed.');
|
||||
}
|
||||
return implode("\n", $output);
|
||||
|
Reference in New Issue
Block a user