From: = Date: Thu, 13 Nov 2014 18:34:48 +0000 (-0500) Subject: Make it work when a file is opened without a project X-Git-Tag: v0.3.1~1^2 X-Git-Url: https://arthur.barton.de/gitweb/?p=atom-ax-pipe.git;a=commitdiff_plain;h=e5059036dbdc3c16b0208045133a6491e5f3d2e2 Make it work when a file is opened without a project --- diff --git a/lib/pipe.coffee b/lib/pipe.coffee index 5ccd6b0..5294840 100644 --- a/lib/pipe.coffee +++ b/lib/pipe.coffee @@ -22,7 +22,8 @@ module.exports = if history.length > 300 history.shift() - commandString = "cd '#{atom.project.rootDirectory.path}' && #{commandString}" + if atom.project.rootDirectory? + commandString = "cd '#{atom.project.rootDirectory.path}' && #{commandString}" properties = { reversed: true, invalidate: 'never' } for range in editor.getSelectedBufferRanges()