diff --git a/lib/darwin/firefox.js b/lib/darwin/firefox.js index c4ce5ae..69436f2 100644 --- a/lib/darwin/firefox.js +++ b/lib/darwin/firefox.js @@ -11,7 +11,7 @@ exports.all = function( callback ) { } }; - util.find( 'org.mozilla.firefox', function( err, p ) { + util.find( ['org.mozilla.firefox', 'org.mozilla.firefoxdeveloperedition'], function( err, p ) { if ( p ) { var items = p.split( '\n' ); pending = items.length; diff --git a/lib/darwin/util.js b/lib/darwin/util.js index bd6c940..9cafad7 100644 --- a/lib/darwin/util.js +++ b/lib/darwin/util.js @@ -17,8 +17,19 @@ exports.parse = function( file, callback ) { } ); }; -exports.find = function( id, callback ) { - var pathQuery = 'mdfind "kMDItemCFBundleIdentifier=="' + id + '"" | head -1'; +exports.find = function( ids, callback ) { + var pathQuery = 'mdfind "'; + + if (!Array.isArray(ids)) { + ids = [ids]; + } + for (var i = 0; i < ids.length; i++) { + pathQuery += 'kMDItemCFBundleIdentifier=="' + ids[i] + '"'; + if (i !== ids.length - 1) { //when this isn't the last one + pathQuery += ' || '; + } + } + pathQuery += '" | head -1'; exec( pathQuery, function( err, stdout ) { var loc = stdout.trim();