From 17b68160cd4fc8840fd9ee15a23cef382bd42d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Sat, 19 Sep 2015 14:32:58 +0200 Subject: [PATCH 1/2] Fix coffelint error causing Travis builds to fail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, running coffeelint produces this error and causes Travis builds to fail: ``` Running "coffeelint:src" (coffeelint) task src/command-installer.coffee ✖ line 73 Line contains inconsistent indentation Expected 2 got 0 ✖ 1 error Warning: Task "coffeelint:src" failed. Use --force to continue. Error: Task "coffeelint:src" failed. ``` See https://github.com/clutchski/coffeelint/issues/189 for more information on this problem and suggested approach, and for a different place in Atom where this approach is used see this: https://github.com/atom/atom/blob/ca39c106d6570b7e46129dd445dde3b9ba84cf9f/src/config.coffee#L984 --- src/command-installer.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/command-installer.coffee b/src/command-installer.coffee index afd5000c1..873c76839 100644 --- a/src/command-installer.coffee +++ b/src/command-installer.coffee @@ -71,5 +71,6 @@ module.exports = error = null symlinkCommandWithPrivilegeSync(commandPath, destinationPath) catch error + undefined callback?(error) From abe924f23185e51f86774e65fb82c638e8777307 Mon Sep 17 00:00:00 2001 From: Ivan Zuzak Date: Mon, 21 Sep 2015 12:54:50 +0200 Subject: [PATCH 2/2] Assign error in catch block for clarity --- src/command-installer.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/command-installer.coffee b/src/command-installer.coffee index 873c76839..4a0e52bd8 100644 --- a/src/command-installer.coffee +++ b/src/command-installer.coffee @@ -70,7 +70,7 @@ module.exports = try error = null symlinkCommandWithPrivilegeSync(commandPath, destinationPath) - catch error - undefined + catch err + error = err callback?(error)