mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Invoke callback with empty array on non-zero exit code
This commit is contained in:
@@ -17,8 +17,11 @@ class LoadPathsTask
|
||||
args.unshift('--follow')
|
||||
|
||||
paths = []
|
||||
exit = =>
|
||||
@callback(paths)
|
||||
exit = (code) =>
|
||||
if code is 0
|
||||
@callback(paths)
|
||||
else
|
||||
@callback([])
|
||||
stdout = (data) ->
|
||||
paths.push(_.compact(data.split('\n'))...)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user