Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
allow to react and catch error when sonar analyis fails
Browse files Browse the repository at this point in the history
  • Loading branch information
q457466 committed Apr 26, 2020
1 parent c8d764f commit 8f1a113
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ function scanCLI(cliArgs, params, callback) {
log('SonarQube analysis finished.')
callback()
} catch (error) {
process.exit(error.status)
log('SonarQube analysis failed with error: ' + error)
callback(error);
}
})
}
Expand All @@ -52,7 +53,8 @@ function scanUsingCustomSonarQubeScanner(params, callback) {
log('SonarQube analysis finished.')
callback()
} catch (error) {
process.exit(error.status)
log('SonarQube analysis failed with error: ' + error)
callback(error);
}
})
}

0 comments on commit 8f1a113

Please sign in to comment.