Address more PR comments, refactoring

This commit is contained in:
Angela P Wen 2022-08-02 12:18:44 +02:00
parent 44a27e6a51
commit 5895ab0c0b
9 changed files with 67 additions and 57 deletions

View file

@ -30,10 +30,9 @@ const config_utils_1 = require("./config-utils");
const logging_1 = require("./logging");
async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, uploadFinalLogsDebugArtifact) {
const logger = (0, logging_1.getActionsLogger)();
let config = undefined;
config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger);
const config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger);
if (config === undefined) {
throw new Error("Config file could not be found at expected location. Has the 'init' action been called?");
throw new Error("Config file could not be found at expected location. Did the 'init' action fail to start?");
}
// Upload appropriate Actions artifacts for debugging
if (config === null || config === void 0 ? void 0 : config.debugMode) {