     null
 
   open: (pathsToOpen) ->
-    pathsToOpen ?= [null]
-    for pathToOpen in pathsToOpen
-      pathToOpen = path.resolve(@executedFrom, pathToOpen) if @executedFrom and pathToOpen
-      if existingWindow = @windowForPath(pathToOpen)
-        existingWindow.focus()
-        existingWindow.sendCommand('window:open-path', pathToOpen)
-      else
-        atomWindow = new AtomWindow
-          pathToOpen: pathToOpen
+    if pathsToOpen?
+      for pathToOpen in pathsToOpen
+        pathToOpen = path.resolve(@executedFrom, pathToOpen) if @executedFrom and pathToOpen
+        if existingWindow = @windowForPath(pathToOpen)
+          existingWindow.focus()
+          existingWindow.sendCommand('window:open-path', pathToOpen)
+        else
+          atomWindow = new AtomWindow
+            pathToOpen: pathToOpen
+            bootstrapScript: 'window-bootstrap'
+            resourcePath: @resourcePath
+    else
+      atomWindow = new AtomWindow
           bootstrapScript: 'window-bootstrap'
           resourcePath: @resourcePath
 

  socketPath: '/tmp/atom.sock'

  constructor: ({@resourcePath, @executedFrom, @pathsToOpen, @testMode, @version}) ->
    @pathsToOpen ?= [@executedFrom] if @executedFrom
    @executedFrom ?= process.cwd()
    atomApplication = this
    @windows = []


  sendArgumentsToExistingProcess: (callback) ->
    client = net.connect {path: @socketPath}, (args...) =>
      output = JSON.stringify({@pathsToOpen})
      client.write(output)
      callback(true)

