Skip to content

Commit b715292

Browse files
committed
Move config saving within try-catch
1 parent 7c72e12 commit b715292

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/init-action.js

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/init-action.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,12 @@ async function run() {
730730
// did not exist until now.
731731
flushDiagnostics(config);
732732

733+
// We save the config here instead of at the end of `initConfig` because we
734+
// may have updated the config returned from `initConfig`, e.g. to revert to
735+
// `OverlayDatabaseMode.None` if we failed to download an overlay-base
736+
// database.
737+
await configUtils.saveConfig(config, logger);
738+
733739
core.setOutput("codeql-path", config.codeQLCmd);
734740
core.setOutput("codeql-version", (await codeql.getVersion()).version);
735741
} catch (unwrappedError) {
@@ -752,12 +758,6 @@ async function run() {
752758
} finally {
753759
logUnwrittenDiagnostics();
754760
}
755-
756-
// We save the config here instead of at the end of `initConfig` because we
757-
// may have updated the config returned from `initConfig`, e.g. to revert to
758-
// `OverlayDatabaseMode.None` if we failed to download an overlay-base
759-
// database.
760-
await configUtils.saveConfig(config, logger);
761761
await sendCompletedStatusReport(
762762
startedAt,
763763
config,

0 commit comments

Comments
 (0)