From e5059036dbdc3c16b0208045133a6491e5f3d2e2 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 13 Nov 2014 13:34:48 -0500 Subject: [PATCH] Make it work when a file is opened without a project --- lib/pipe.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- 2.39.2