Permalink
Browse files

Merge pull request #10 from wayoutmind/master

tick_processor error matches OS, validate tick_processor is correct
  • Loading branch information...
2 parents 142f406 + 2fcc10a commit 79567305591c556fe02d45e02d9862f37d5421ce @mape committed Jan 17, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 bin/nodeprofile
View
@@ -39,7 +39,11 @@ exec(command).on('exit', function (code, signal) {
exec('locate '+tick_processor, function (err, stdout, stderr) {
if (err) throw err;
- var tickLocations = stdout.trim().split('\n');
+ var tickLocations = stdout.trim().split('\n').filter(
+ function(location) {
+ location = location.split('/');
+ return (location[location.length - 1] === tick_processor);
+ });
if (tickLocations[0]) {
exec(tickLocations[0]+' '+logName, function (err, stdout, stderr) {
if (!err) {
@@ -66,7 +70,7 @@ exec(command).on('exit', function (code, signal) {
});
});
} else {
- throw new Error('Could not find linux-tick-processor.py');
+ throw new Error('Could not find ' + tick_processor);
}
});
});

0 comments on commit 7956730

Please sign in to comment.