lib/index.js
function getBinPath(cmd, fn) {
  which(cmd, function(err, bin) {
    if (err) {
      return fn(err);
    }

    fs.exists(bin, function(exists) {
      if (!exists) {
        return fn(new Error(format(
          'Expected file for `%s` does not exist at `%s`',
          cmd, bin)));
      }
      fn(null, bin);
    });
  });
}
function getBinPath(cmd, fn) {
  which(cmd, function(err, bin) {
    if (err) {
      return fn(err);
    }

    fs.exists(bin, function(exists) {
      if (!exists) {
        return fn(new Error(format(
          'Expected file for `%s` does not exist at `%s`',
          cmd, bin)));
      }
      fn(null, bin);
    });
  });
}
function getBinPath ( cmd , fn ) { which ( cmd , function ( err , bin ) { if ( err ) { return fn ( err ) ; } fs . exists ( bin , function ( exists ) { if ( ! exists ) { return fn ( new Error ( format ( 'Expected file for `%s` does not exist at `%s`' , cmd , bin ) ) ) ; } fn ( null , bin ) ; } ) ; } ) ; }
Gets the absolute path for a `cmd`.
@param {String} cmd - e.g. `codesign`.
@param {Function} fn - Callback which receives `(err, binPath)`.
@return {void}
Gets the absolute path for a cmd .