Skip to content

Commit 713a1dd

Browse files
Always upload DB when in debug mode
1 parent cdea582 commit 713a1dd

3 files changed

Lines changed: 20 additions & 16 deletions

File tree

lib/analyze-action.js

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/analyze-action.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,6 @@ async function run() {
207207
getActionsLogger()
208208
);
209209
}
210-
211-
if (config.debugMode) {
212-
// Upload the database bundles as an Actions artifact for debugging
213-
const toUpload: string[] = [];
214-
for (const language of config.languages)
215-
toUpload.push(await bundleDb(config, language, codeql));
216-
await uploadDebugArtifacts(toUpload, config.dbLocation);
217-
}
218210
} catch (origError) {
219211
const error =
220212
origError instanceof Error ? origError : new Error(String(origError));
@@ -230,6 +222,17 @@ async function run() {
230222

231223
return;
232224
} finally {
225+
if (config !== undefined && config.debugMode) {
226+
// Upload the database bundles as an Actions artifact for debugging
227+
const toUpload: string[] = [];
228+
for (const language of config.languages) {
229+
toUpload.push(
230+
await bundleDb(config, language, await getCodeQL(config.codeQLCmd))
231+
);
232+
}
233+
await uploadDebugArtifacts(toUpload, config.dbLocation);
234+
}
235+
233236
if (core.isDebug() && config !== undefined) {
234237
core.info("Debug mode is on. Printing CodeQL debug logs...");
235238
for (const language of config.languages) {

0 commit comments

Comments
 (0)