From 69f7af7c63e99610d9cab097f6dc5b30c34e784a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 5 Jun 2013 11:54:21 -0700 Subject: [PATCH] Ignore errors unlinking non-existent path --- src/stdlib/command-installer.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stdlib/command-installer.coffee b/src/stdlib/command-installer.coffee index 7bc6e6120..aaee8b0df 100644 --- a/src/stdlib/command-installer.coffee +++ b/src/stdlib/command-installer.coffee @@ -17,9 +17,9 @@ symlinkCommand = (sourcePath, destinationPath, callback) -> fs.chmod(destinationPath, 0o755, callback) unlinkCommand = (destinationPath, callback) -> - fs.exists destinationPath, (exists) -> - if exists - fs.unlink(destinationPath, callback) + fs.unlink destinationPath, (error) -> + if error? and error.code isnt 'ENOENT' + callback(error) else callback()