Skip to content

Commit

Permalink
validate tick-processor location (eg. mac-tick-processor.svn-base) in…
Browse files Browse the repository at this point in the history
…stead of simply pulling first locate result
  • Loading branch information
Fredrick Galoso committed Jan 12, 2012
1 parent 333ab94 commit 2fcc10a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/nodeprofile
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2fcc10a

Please sign in to comment.