Skip to content

Commit

Permalink
fix: always let printed reports send to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
KalleChen committed Oct 20, 2023
1 parent 5e881bd commit d14374f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions solhint.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function executeMainActionLogic() {

printReports(reports, formatterFn)

exitWithCode(reports)
process.exit(0)
}

function processStdin(options) {
Expand All @@ -185,7 +185,7 @@ function processStdin(options) {

printReports(reports, formatterFn)

exitWithCode(reports)
process.exit(0)
}

function writeSampleConfigFile() {
Expand Down Expand Up @@ -365,11 +365,6 @@ function listRules() {
}
}

function exitWithCode(reports) {
const errorsCount = reports.reduce((acc, i) => acc + i.errorCount, 0)
process.exit(errorsCount > 0 ? 1 : 0)
}

function checkForUpdate() {
// eslint-disable-next-line import/no-extraneous-dependencies
return import('latest-version')
Expand Down

0 comments on commit d14374f

Please sign in to comment.