Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
init-action: save updated config
This commit updates the init action to save the config again at the end
of run(), so that config updates in run() are correctly propagated to
the analyze action.
  • Loading branch information
cklin committed Sep 11, 2025
commit 4e2e64a92a4b1f28841376f56459f1cf9390d39e
1 change: 1 addition & 0 deletions lib/init-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/config-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ export function getPathToParsedConfigFile(tempDir: string): string {
/**
* Store the given config to the path returned from getPathToParsedConfigFile.
*/
async function saveConfig(config: Config, logger: Logger) {
export async function saveConfig(config: Config, logger: Logger) {
const configString = JSON.stringify(config);
const configFile = getPathToParsedConfigFile(config.tempDir);
fs.mkdirSync(path.dirname(configFile), { recursive: true });
Expand Down
6 changes: 6 additions & 0 deletions src/init-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,12 @@ async function run() {
} finally {
logUnwrittenDiagnostics();
}

// We may have updated the config returned from `initConfig`, e.g. to revert
// to `OverlayDatabaseMode.None` if we failed to download an overlay-base
// database. So we save the config again, to ensure that the `analyze` step
// reads the correct config.
await configUtils.saveConfig(config, logger);
await sendCompletedStatusReport(
startedAt,
config,
Expand Down
Loading