Skip to content

Commit

Permalink
fix: detectSeries third callback not passing err
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Feb 27, 2021
1 parent ea78e5f commit 1b413e5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/install.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -518,16 +518,17 @@ class Install extends Command
]

cloneFirstValidGitUrl: (urls, cloneDir, options, callback) ->
async.detectSeries urls, (url, next) =>
async.detectSeries(urls, (url, next) =>
@cloneNormalizedUrl url, cloneDir, options, (error) ->
next(not error)
, (result) ->
if not result
next(null, not error)
, (err, result) ->
if err or not result
invalidUrls = "Couldn't clone #{urls.join(' or ')}"
invalidUrlsError = new Error(invalidUrls)
callback(invalidUrlsError)
else
callback()
)

cloneNormalizedUrl: (url, cloneDir, options, callback) ->
# Require here to avoid circular dependency
Expand Down

0 comments on commit 1b413e5

Please sign in to comment.