]> arthur.barton.de Git - atom-ax-pipe.git/blobdiff - lib/pipe.coffee
Merge pull request #3 from brandonhorst/master
[atom-ax-pipe.git] / lib / pipe.coffee
index a85b6348e9b88ac50258d0c9a5f2c7237175111f..5294840bd507d0833bc6a85f296f20a40320056f 100644 (file)
@@ -22,7 +22,8 @@ module.exports =
       if history.length > 300
         history.shift()
 
       if history.length > 300
         history.shift()
 
-      commandString = "cd '#{atom.project.path}' && #{commandString}"
+      if atom.project.rootDirectory?
+        commandString = "cd '#{atom.project.rootDirectory.path}' && #{commandString}"
       properties = { reversed: true, invalidate: 'never' }
 
       for range in editor.getSelectedBufferRanges()
       properties = { reversed: true, invalidate: 'never' }
 
       for range in editor.getSelectedBufferRanges()