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
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