http://www.mediawiki.org/wiki/Special:Code/MediaWiki/56679

Revision: 56679
Author:   avar
Date:     2009-09-20 18:11:51 +0000 (Sun, 20 Sep 2009)

Log Message:
-----------
include stdout in the error message if it dies

Modified Paths:
--------------
    trunk/extensions/Translate/utils/TranslateYaml.php

Modified: trunk/extensions/Translate/utils/TranslateYaml.php
===================================================================
--- trunk/extensions/Translate/utils/TranslateYaml.php  2009-09-20 18:11:45 UTC 
(rev 56678)
+++ trunk/extensions/Translate/utils/TranslateYaml.php  2009-09-20 18:11:51 UTC 
(rev 56679)
@@ -45,9 +45,9 @@
                       "open my \$fh, q[>], q[$tf.serialized] or die qq[Can not 
open $tf.serialized];" .
                       "print \$fh serialize(\$yaml);" .
                       "close(\$fh);'";
-               wfShellExec( $cmd, &$ret );
+               $out = wfShellExec( $cmd, &$ret );
                if ( $ret != 0 )
-                       die("The command '$cmd' died in execution with exit 
code '$ret'");
+                       die("The command '$cmd' died in execution with exit 
code '$ret': $out");
                }
 
                $serialized = file_get_contents("$tf.serialized");
@@ -71,9 +71,9 @@
                $cmd = "perl -MYAML::Syck=DumpFile 
-MPHP::Serialization=unserialize -MFile::Slurp=slurp -le '" .
                       "my \$serialized = slurp(\"$tf\");" .
                           "DumpFile(q[$tf.yaml], \$serialized);'";
-               wfShellExec( $cmd, &$ret );
+               $out = wfShellExec( $cmd, &$ret );
                if ( $ret != 0 )
-                       die("The command '$cmd' died in execution with exit 
code '$ret'");
+                       die("The command '$cmd' died in execution with exit 
code '$ret': $out");
                }
 
                $yaml = file_get_contents("$tf.yaml");



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to