mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 09:14:58 +00:00
Log error in restoreInputs instead of re-throwing it
This commit is contained in:
17
lib/entry-points.js
generated
17
lib/entry-points.js
generated
@@ -146398,7 +146398,7 @@ var persistInputs = function(env = getEnv()) {
|
||||
);
|
||||
core3.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables));
|
||||
};
|
||||
var restoreInputs = function() {
|
||||
function restoreInputs(logger) {
|
||||
try {
|
||||
const persistedInputsValue = core3.getState(persistedInputsKey);
|
||||
if (persistedInputsValue) {
|
||||
@@ -146408,9 +146408,12 @@ var restoreInputs = function() {
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
throw new Error(`Unable to restore inputs: ${getErrorMessage(err)}`);
|
||||
logger.error(`Unable to restore inputs: ${getErrorMessage(err)}`);
|
||||
throw new Error(
|
||||
"Failed to restore inputs from the state set by this action's main execution."
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
function getPullRequestBranches(env = getEnv()) {
|
||||
const pullRequest = github.context.payload.pull_request;
|
||||
if (pullRequest) {
|
||||
@@ -161729,8 +161732,8 @@ async function createDatabaseBundleCli(codeql, config, language) {
|
||||
// src/analyze-action-post.ts
|
||||
async function runWrapper2() {
|
||||
try {
|
||||
restoreInputs();
|
||||
const logger = getActionsLogger();
|
||||
restoreInputs(logger);
|
||||
const gitHubVersion = await getGitHubVersion();
|
||||
checkGitHubVersionInRange(gitHubVersion, logger);
|
||||
if (process.env["CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */] === "true") {
|
||||
@@ -163026,7 +163029,7 @@ async function run4(startedAt) {
|
||||
let dependencyCachingUsage;
|
||||
try {
|
||||
const jobStatus2 = getOptionalInput("job-status");
|
||||
restoreInputs();
|
||||
restoreInputs(logger);
|
||||
const gitHubVersion = await getGitHubVersion();
|
||||
checkGitHubVersionInRange(gitHubVersion, logger);
|
||||
const repositoryNwo = getRepositoryNwo();
|
||||
@@ -164177,7 +164180,7 @@ var core29 = __toESM(require_core());
|
||||
async function runWrapper9() {
|
||||
const logger = getActionsLogger();
|
||||
try {
|
||||
restoreInputs();
|
||||
restoreInputs(logger);
|
||||
const pid = core29.getState("proxy-process-pid");
|
||||
if (pid) {
|
||||
process.kill(Number(pid));
|
||||
@@ -164328,8 +164331,8 @@ async function runWrapper10() {
|
||||
var core31 = __toESM(require_core());
|
||||
async function runWrapper11() {
|
||||
try {
|
||||
restoreInputs();
|
||||
const logger = getActionsLogger();
|
||||
restoreInputs(logger);
|
||||
const gitHubVersion = await getGitHubVersion();
|
||||
checkGitHubVersionInRange(gitHubVersion, logger);
|
||||
if (process.env["CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */] !== "true") {
|
||||
|
||||
Reference in New Issue
Block a user