     @subscriptions.dispose()
 
   browsePackages: ->
-    if @fileManager isnt null
+    packageDir: atom.packages.getPackageDirPaths()[0]
 
-      # Does packages folder exist?
-      try
-        fs.accessSync(@packageDir, fs.F_OK)
-      catch error
-        atom.notifications.addError(@self, detail: error, dismissable: true)
-        return
+    # Does packages folder exist?
+    try
+      fs.accessSync(packageDir, fs.F_OK)
+    catch error
+      atom.notifications.addError(@self, detail: error, dismissable: true)
+      return
 
-      # Open packages folder
-      exec "#{@fileManager} #{@packageDir}"
+    # Open packages folder
+    shell.showItemInFolder(packageDir)
 
   revealFile: ->
     # Get parent folder of active file

{exec,execSync} = require('child_process')
fs   = require 'fs'
path = require 'path'

{CompositeDisposable} = require 'atom'

module.exports = BrowsePackages =
  self: 'browse'
  debug: false
  subscriptions: null
  fileManager: null
  configFile: atom.config.getUserConfigPath()
  packageDir: atom.packages.getPackageDirPaths()[0]
  linuxFileManagers: ['nautilus', 'dolphin', 'xdg-open', 'gnome-open', 'kde-open']

  activate: ->

    # Find default file manager
    @fileManager = @getFileManager()

    # Events subscribed to in atom's system can be easily cleaned up with a CompositeDisposable
    @subscriptions = new CompositeDisposable


        continue

      # Open project folder
      shell.showItemInFolder(project)

  browseConfig: ->
    configFile: atom.config.getUserConfigPath()
    configPath = path.dirname(configFile)

    # Does config folder exist?
    try
      fs.accessSync(configPath, fs.F_OK)
    catch error
      atom.notifications.addError(@self, detail: error, dismissable: true)
      return

    # Open config folder
    shell.openItem(configPath)
