[Jifty-commit] jifty branch, master, updated. 142051c554fed3b376740f758e88f24e6945a7f3

Jifty commits jifty-commit at lists.jifty.org
Sun Feb 14 23:15:59 EST 2010


The branch, master has been updated
       via  142051c554fed3b376740f758e88f24e6945a7f3 (commit)
      from  f2640eb4c36038f5e293d76d3d6aa44f36e60efb (commit)

Summary of changes:
 lib/Jifty/Plugin/CompressedCSSandJS.pm |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 142051c554fed3b376740f758e88f24e6945a7f3
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Sun Feb 14 23:08:51 2010 -0500

    Capture STDERR, and log it if we get a non-0 return value from minify

diff --git a/lib/Jifty/Plugin/CompressedCSSandJS.pm b/lib/Jifty/Plugin/CompressedCSSandJS.pm
index d360471..4ee6624 100644
--- a/lib/Jifty/Plugin/CompressedCSSandJS.pm
+++ b/lib/Jifty/Plugin/CompressedCSSandJS.pm
@@ -233,7 +233,7 @@ Runs the given JS through jsmin
 sub minify_js {
     my $self = shift;
     my $input = shift;
-    my $output;
+    my ($output, $err);
 
     $self->log->debug("Minifying JS...");
 
@@ -249,7 +249,10 @@ sub minify_js {
     local *STDERR = $stderr;
 
     local $SIG{'CHLD'} = 'DEFAULT';
-    run3 [$self->jsmin], $input, \$output, undef;
+    run3 [$self->jsmin], $input, \$output, \$err;
+
+    my $ret = $? >> 8;
+    warn "Javascript minify @{[$self->jsmin]} returned $ret:\n$err" if $ret;
 
     $$input = $output;
 }

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list