]> git.donarmstrong.com Git - rsem.git/blobdiff - rsem-calculate-expression
Fixed a bug in perl scripts for printing error messages
[rsem.git] / rsem-calculate-expression
index 9e6ef2e99e1d72e7db053401b764d62f6e7bd5f8..684e33c2c3eb713536e3f1db6a82d44acda0bbe2 100755 (executable)
@@ -345,12 +345,12 @@ if ($mTime) {
 sub runCommand {
     print $_[0]."\n";
     my $status = system($_[0]);
-    if ($status != 0) { 
-       my $errmsg;
-       if (scalar(@_) > 1) { $errmsg = $_[1]; }
-       else { $errmsg = "\"$command\" failed! Plase check if you provide correct parameters/options for the pipeline!"; }
-       print $errmsg."\n";
-       exit(-1);
+    if ($status != 0) {
+        my $errmsg = "";
+        if (scalar(@_) > 1) { $errmsg .= $_[1]."\n"; }
+        $errmsg .= "\"$_[0]\" failed! Plase check if you provide correct parameters/options for the pipeline!\n";
+        print $errmsg;
+        exit(-1);
     }
     print "\n";
 }