Refactor configuration errors (#2105)
Refactor the existing classes of configuration errors into their own file; consolidate the place we check for configuration errors into `codeql.ts`, where the actual command invocations happen. Also, rename the `UserError` type to `ConfigurationError` to standardize on a single term.
This commit is contained in:
parent
fc9f9e5ef9
commit
1515e2bb20
54 changed files with 654 additions and 502 deletions
4
lib/resolve-environment-action.js
generated
4
lib/resolve-environment-action.js
generated
|
|
@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
const core = __importStar(require("@actions/core"));
|
||||
const actions_util_1 = require("./actions-util");
|
||||
const api_client_1 = require("./api-client");
|
||||
const codeql_1 = require("./codeql");
|
||||
const cli_errors_1 = require("./cli-errors");
|
||||
const configUtils = __importStar(require("./config-utils"));
|
||||
const logging_1 = require("./logging");
|
||||
const resolve_environment_1 = require("./resolve-environment");
|
||||
|
|
@ -54,7 +54,7 @@ async function run() {
|
|||
}
|
||||
catch (unwrappedError) {
|
||||
const error = (0, util_1.wrapError)(unwrappedError);
|
||||
if (error instanceof codeql_1.CommandInvocationError) {
|
||||
if (error instanceof cli_errors_1.CommandInvocationError) {
|
||||
// If the CLI failed to run successfully for whatever reason,
|
||||
// we just return an empty JSON object and proceed with the workflow.
|
||||
core.setOutput(ENVIRONMENT_OUTPUT_NAME, {});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue