mirror of
https://github.com/atom/atom.git
synced 2026-02-18 10:31:54 -05:00
Ignore errors unlinking non-existent path
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user