]> git.donarmstrong.com Git - rsem.git/blobdiff - rsem-prepare-reference
Fixed a bug in perl scripts for printing error messages
[rsem.git] / rsem-prepare-reference
index 80a954942031c88f6e6e50eb3fd84c86793ad20a..56d6972d12ad99f3cecceda21c6dfbc6133feebd 100755 (executable)
@@ -97,12 +97,12 @@ if (!$no_bowtie) {
 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";
 }