diff --git a/index.js b/index.js index d65cb15..eecfa99 100644 --- a/index.js +++ b/index.js @@ -35,9 +35,6 @@ function licensee (configuration, path, callback) { } else { var arborist = new Arborist({ path }) arborist.loadActual({ forceActual: true }) - .catch(function (error) { - return callback(error) - }) .then(function (tree) { var children = Array.from(tree.children.values()) if (configuration.filterPackages) { @@ -45,6 +42,9 @@ function licensee (configuration, path, callback) { } callback(null, findIssues(configuration, children, [])) }) + .catch(function (error) { + return callback(error) + }) } }