diff --git a/ribosome.js b/ribosome.js index ec909bd..efef096 100755 --- a/ribosome.js +++ b/ribosome.js @@ -405,6 +405,7 @@ Array.prototype.last = function() { var fs = require('fs'); var path = require('path'); var exec = require('child_process').exec; +var exec = require('child_process').exec; function addslashes(str) { @@ -630,21 +631,14 @@ if (rnaopt) { } if (!rnaopt) { - exec("node" + rnafile + " " + process.argv.slice(3).join(' '), function(error, stdout, stderr) { - if(stderr != "") { - exec("node " + rnafile + " " + process.argv.slice(3).join(' '), function(error, stdout, stderr) { - process.stdout.write(stdout); - process.stdout.write(stderr); - fs.unlinkSync(rnafile); - - if (error) { - process.exit(error.code); - } - }); - } else { + exec("node " + rnafile + " " + process.argv.slice(3).join(' '), + function(error, stdout, stderr) { process.stdout.write(stdout); + process.stdout.write(stderr); fs.unlinkSync(rnafile); - } - }); + + if (error) + process.exit(error.code); + }); }