Skip to content

Commit 17fe528

Browse files
authored
fix: error variable was shadowed by function (#162)
1 parent 2e7eab8 commit 17fe528

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/lockfile-lint/bin/lockfile-lint.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ let config
3131
try {
3232
config = require('../src/config')(process.argv)
3333
debug(`parsed the following options: ${JSON.stringify(config)}`)
34-
} catch (err) {
35-
debug(`error loading options from CLI arguments/files: ${err}`)
34+
} catch (errorPayload) {
35+
debug(`error loading options from CLI arguments/files: ${errorPayload}`)
3636
process.exit(1)
3737
}
3838

@@ -82,10 +82,10 @@ try {
8282
type: config['type'],
8383
validators
8484
})
85-
} catch (error) {
85+
} catch (errorPayload) {
8686
warn('ABORTING lockfile lint process due to error exceptions')
87-
console.error(error.message, '\n')
88-
console.error(error.stack, '\n')
87+
console.error(errorPayload.message, '\n')
88+
console.error(errorPayload.stack, '\n')
8989
error('Error: command failed with exit code 1')
9090
process.exit(1)
9191
}

0 commit comments

Comments
 (0)