     resourcePaths.push path.join(homeDir, '.atom', 'packages')
 
     resourcePaths = resourcePaths.map (relativeOrAbsolutePath) =>
-      path.resolve @commandLineArgs['resource-path'], relativeOrAbsolutePath
+      path.resolve @resourcePath, relativeOrAbsolutePath
 
     process.env['NODE_PATH'] = resourcePaths.join path.delimiter
 


class BrowserMain
  windowState: null
  commandLineArgs: null

  constructor: ->
    modifiedArgv = ['node'].concat(process.argv) # optimist assumes the first arg will be node
    @commandLineArgs = optimist(modifiedArgv).argv
    @windowState = {}

    @handleEvents()
    @setupNodePaths()

  setupNodePaths: ->
    resourcePaths = [

delegate.browserMainParts.preMainMessageLoopRun = ->
  new AtomWindow
    bootstrapScript: 'window-bootstrap',
    resourcePath: browserMain.resourcePath
