mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
fix: clarify upload-sarify category uniqueness error message
This commit is contained in:
3
lib/upload-lib.js
generated
3
lib/upload-lib.js
generated
@@ -355,7 +355,8 @@ function validateUniqueCategory(sarif) {
|
||||
const sentinelEnvVar = `CODEQL_UPLOAD_SARIF_${category}`;
|
||||
if (process.env[sentinelEnvVar]) {
|
||||
throw new Error("Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. " +
|
||||
"The easiest fix is to specify a unique value for the `category` input. " +
|
||||
"The easiest fix is to specify a unique value for the `category` input. If .runs[].automationDetails.id is specified " +
|
||||
"in the sarif file, that will take precedence over your configured `category`. " +
|
||||
`Category: (${id ? id : "none"}) Tool: (${tool ? tool : "none"})`);
|
||||
}
|
||||
core.exportVariable(sentinelEnvVar, sentinelEnvVar);
|
||||
|
||||
Reference in New Issue
Block a user