Skip to content

Commit

Permalink
remove a bug and the subsequent bugfix
Browse files Browse the repository at this point in the history
'node' is concatenated to the name of the rna file without spaces, and exec'ed.
This can't work and requires a subsequent retry, with the space this time. The
solution is simple to remove the first exec call.
  • Loading branch information
norswap committed Sep 3, 2018
1 parent 10cd4cd commit 0bd5b32
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions ribosome.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
});
}

0 comments on commit 0bd5b32

Please sign in to comment.