mirror of
https://github.com/github/codeql-action.git
synced 2026-01-03 21:20:09 +08:00
Clean up DB cluster directory at the end of each job
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import * as fs from "fs";
|
||||
|
||||
import * as core from "@actions/core";
|
||||
import * as github from "@actions/github";
|
||||
|
||||
@@ -217,6 +219,19 @@ export async function run(
|
||||
await printDebugLogs(config);
|
||||
}
|
||||
|
||||
try {
|
||||
fs.rmSync(config.dbLocation, {
|
||||
recursive: true,
|
||||
force: true,
|
||||
maxRetries: 3,
|
||||
});
|
||||
logger.info(`Cleaned up database cluster directory ${config.dbLocation}.`);
|
||||
} catch (e) {
|
||||
logger.warning(
|
||||
`Failed to clean up database cluster directory ${config.dbLocation}. Details: ${e}`,
|
||||
);
|
||||
}
|
||||
|
||||
return uploadFailedSarifResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user