mirror of
https://github.com/danog/gift.git
synced 2024-11-26 20:04:47 +01:00
src/repo: fixed single argument form of ls_files
This commit is contained in:
parent
0c394739d6
commit
155c6f7d6a
@ -293,8 +293,12 @@ module.exports = class Repo
|
||||
# callback - Receives `(err,stdout)`.
|
||||
#
|
||||
ls_files: (files, options, callback) ->
|
||||
# support the single arg sig
|
||||
if arguments.length == 1
|
||||
callback = files
|
||||
files = null
|
||||
# support the old (options, callback) sig
|
||||
if arguments.length < 3
|
||||
else if arguments.length < 3
|
||||
[options, callback] = [files, options]
|
||||
files = null
|
||||
callback ?= ->
|
||||
|
Loading…
Reference in New Issue
Block a user