 
 class BrowserMain
   windowState: null
-  commandLineArgs: null
+  resourcePath: null
 
   constructor: ->
-    modifiedArgv = ['node'].concat(process.argv) # optimist assumes the first arg will be node
-    @commandLineArgs = optimist(modifiedArgv).argv
     @windowState = {}
 
+    @parseCommandLine()
+    @setupNodePaths()
     @handleEvents()
-    @setupNodePaths()
+
+  parseCommandLine: ->
+    modifiedArgv = ['node'].concat(process.argv) # optimist assumes the first arg will be node
+    args = optimist(modifiedArgv).argv
+    @resourcePath = args['resource-path']
 
   setupNodePaths: ->
     resourcePaths = [

    resourcePaths.push path.join(homeDir, '.atom', 'packages')

    resourcePaths = resourcePaths.map (relativeOrAbsolutePath) =>
      path.resolve @commandLineArgs['resource-path'], relativeOrAbsolutePath

    process.env['NODE_PATH'] = resourcePaths.join path.delimiter


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