]> arthur.barton.de Git - atom-ax-pipe.git/commitdiff
Merge pull request #3 from brandonhorst/master
authormoshee <moshee@displaynone.us>
Thu, 13 Nov 2014 19:04:54 +0000 (11:04 -0800)
committermoshee <moshee@displaynone.us>
Thu, 13 Nov 2014 19:04:54 +0000 (11:04 -0800)
Fixes for non-directory projects

lib/pipe.coffee

index a85b6348e9b88ac50258d0c9a5f2c7237175111f..5294840bd507d0833bc6a85f296f20a40320056f 100644 (file)
@@ -22,7 +22,8 @@ module.exports =
       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()