Skip to content

Commit

Permalink
refactor: Use a better name for the json result from the checker
Browse files Browse the repository at this point in the history
  • Loading branch information
RSeidelsohn committed Apr 11, 2023
1 parent cc750b0 commit b44fc19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/license-checker-rseidelsohn
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ const unknownArgs = Object.keys(parsedArgs).filter((arg) => !kownOptions.include

exitProcessOrWarnIfNeeded({ unknownArgs, parsedArgs, hasFailingArg });

licenseChecker.init(parsedArgs, function (err, json) {
licenseChecker.init(parsedArgs, function (err, foundLicensesJson) {
if (err) {
console.error('An error has occurred:');
console.error(err);
}

if (helpers.shouldColorizeOutput(parsedArgs)) {
helpers.colorizeOutput(json);
helpers.colorizeOutput(foundLicensesJson);
}

const formattedOutput = helpers.getFormattedOutput(json, parsedArgs);
const formattedOutput = helpers.getFormattedOutput(foundLicensesJson, parsedArgs);

if (parsedArgs.files || parsedArgs.out) {
if (parsedArgs.files) {
licenseChecker.asFiles(json, parsedArgs.files);
licenseChecker.asFiles(foundLicensesJson, parsedArgs.files);
}

if (parsedArgs.out) {
Expand Down

0 comments on commit b44fc19

Please sign in to comment.