Prevent disabling all checks

Prevent users from disabling both the license and vulnerability check by
checking if both are set to `false` and throwing if that's the case.
This commit is contained in:
Eric Cornelissen
2022-10-28 22:08:55 +02:00
parent 31279d265a
commit c5af7ff272
2 changed files with 11 additions and 0 deletions

View File

@@ -90,6 +90,9 @@ export function readInlineConfig(): ConfigurationOptions {
.boolean()
.default(true)
.parse(getOptionalBoolean('vulnerability-check'))
if (license_check === false && vulnerability_check === false) {
throw new Error("Can't disable both license-check and vulnerability-check")
}
const base_ref = getOptionalInput('base-ref')
const head_ref = getOptionalInput('head-ref')