1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-16 19:14:01 +02:00

report temp path when mktemp fails

This commit is contained in:
Elan Ruusamäe
2013-11-08 23:59:04 +02:00
parent 94d2596a57
commit 77f0728eef
2 changed files with 2 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ class Minify_ClosureCompiler {
{ {
self::_prepare(); self::_prepare();
if (! ($tmpFile = tempnam(self::$tempDir, 'cc_'))) { if (! ($tmpFile = tempnam(self::$tempDir, 'cc_'))) {
throw new Exception('Minify_ClosureCompiler : could not create temp file.'); throw new Exception('Minify_ClosureCompiler : could not create temp file in "'.self::$tempDir.'".');
} }
file_put_contents($tmpFile, $js); file_put_contents($tmpFile, $js);
exec(self::_getCmd($options, $tmpFile), $output, $result_code); exec(self::_getCmd($options, $tmpFile), $output, $result_code);

View File

@@ -90,7 +90,7 @@ class Minify_YUICompressor {
{ {
self::_prepare(); self::_prepare();
if (! ($tmpFile = tempnam(self::$tempDir, 'yuic_'))) { if (! ($tmpFile = tempnam(self::$tempDir, 'yuic_'))) {
throw new Exception('Minify_YUICompressor : could not create temp file.'); throw new Exception('Minify_YUICompressor : could not create temp file in "'.self::$tempDir.'".');
} }
file_put_contents($tmpFile, $content); file_put_contents($tmpFile, $content);
exec(self::_getCmd($options, $type, $tmpFile), $output, $result_code); exec(self::_getCmd($options, $type, $tmpFile), $output, $result_code);