alessioalex / dynroute

Node CLI tool for dynamic DNS using Route53
46 stars 5 forks source link

util.js library is attempting to self-reference .exit() function #2

Closed debonet closed 11 years ago

debonet commented 11 years ago

there are a couple of instance of

util.exit(errMsg);

which are actually referencing the built-in util library, but I think the intention is to reference the .exit() function defined in the module itself.

A fix would be to do something like this:


var ns = {};

ns.exit = function(s){
   //...
};

ns.otherFunction = function(){
   //...
   if (err){ 
      ns.exit("got an error"); 
   }
};

module.exports = ns;
alessioalex commented 11 years ago

@debonet I'm actually using utils instead of util, but you're somehow right since utils is undefined there. I'm going to fix this today. Thanks.

alessioalex commented 11 years ago

Fixed in b4d7713117dfbb6e187159d457cafe83b05fe954