lib/utils.js
function(name, callback) {
    if (name in whichCache) {
      return callback(null, whichCache[name]);
    }

    which(name, function(err, result){
      if (err) {
        // Treat errors as not found
        return callback(null, whichCache[name] = '');
      }
      callback(null, whichCache[name] = result);
    });
  }
function(name, callback) {
    if (name in whichCache) {
      return callback(null, whichCache[name]);
    }

    which(name, function(err, result){
      if (err) {
        // Treat errors as not found
        return callback(null, whichCache[name] = '');
      }
      callback(null, whichCache[name] = result);
    });
  }
function ( name , callback ) { if ( name in whichCache ) { return callback ( null , whichCache [ name ] ) ; } which ( name , function ( err , result ) { if ( err ) { // Treat errors as not found return callback ( null , whichCache [ name ] = '' ) ; } callback ( null , whichCache [ name ] = result ) ; } ) ; }
Search for an executable

Uses 'which' or 'where' depending on platform

@param {String} name executable name
@param {Function} callback callback with signature (err, path)
@private
Search for an executable