'use strict';

var exec = require('child_process').exec;
var plist = require('simple-plist');

module.exports = function(path, callback){
  exec('codesign -d --entitlements :- ' + path, function(error, output){
    if(error){
      return callback(error);
    }

    callback(null, plist.parse(output));
  });
};

'use strict';

var plist = require('simple-plist');
var os = require('os').platform();

module.exports = function(path, callback){
  if(os === 'darwin') {
    var exec = require('child_process').exec;
    exec('codesign -d --entitlements :- ' + path, function(error, output){
      if(error){
        return callback(error);
      }
      console.log(output);
      callback(null, plist.parse(output));
    });
  } else {
    console.log('nothing');
    callback(null, {});
  }
};

Check if node is running on darwin before running a darwin only command
Check if node is running on darwin before running a darwin only command
