Skip to content

Commit 00d4d60

Browse files
Always upload DB when in debug mode
1 parent e5d84de commit 00d4d60

File tree

3 files changed

+29
-16
lines changed

3 files changed

+29
-16
lines changed

lib/analyze-action.js

Lines changed: 13 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: 15 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,21 @@ async function run() {
230222

231223
return;
232224
} finally {
225+
if (config !== undefined && config.debugMode) {
226+
try {
227+
// Upload the database bundles as an Actions artifact for debugging
228+
const toUpload: string[] = [];
229+
for (const language of config.languages) {
230+
toUpload.push(
231+
await bundleDb(config, language, await getCodeQL(config.codeQLCmd))
232+
);
233+
}
234+
await uploadDebugArtifacts(toUpload, config.dbLocation);
235+
} catch (error) {
236+
console.log(`Failed to upload database debug bundles: ${error}`);
237+
}
238+
}
239+
233240
if (core.isDebug() && config !== undefined) {
234241
core.info("Debug mode is on. Printing CodeQL debug logs...");
235242
for (const language of config.languages) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy