lirantal / lockfile-lint

Lint an npm or yarn lockfile to analyze and detect security issues
Apache License 2.0
776 stars 35 forks source link

fix: error variable was shadowed by function #162

Closed lirantal closed 1 year ago

lirantal commented 1 year ago

Description

Prior to this fix, an error stack trace would be printed due to a bug in lockfile-lint's error handling. It happened due to the error() function shadowing the local error variable in a try/catch scope.

Types of changes

This PR fixes that undefined error.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Checklist: