Skip to content

Commit 8476401

Browse files
committed
Make lazy FF check less ambiguous
1 parent 4509fb3 commit 8476401

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

lib/entry-points.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/config-utils.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,13 +1175,18 @@ export async function determineUserConfig(
11751175
if (inputs.configInput) {
11761176
const computedConfigPath = userConfigFromActionPath(tempDir);
11771177

1178-
// Get a promise which enables us to determine whether the FF that allows us to
1178+
// Get a function which enables us to determine whether the FF that allows us to
11791179
// merge supported configuration file properties is enabled. We only execute
1180-
// the promise lazily if the other checks pass.
1181-
const allowMergeConfigs = features.getValue(Feature.AllowMergeConfigFiles);
1180+
// this lazily if the other checks pass.
1181+
const allowMergeConfigs = () =>
1182+
features.getValue(Feature.AllowMergeConfigFiles);
11821183

11831184
// Check whether we also have a `config-file` input and decide what to do.
1184-
if (inputs.configFile && isDefaultSetup(env) && (await allowMergeConfigs)) {
1185+
if (
1186+
inputs.configFile &&
1187+
isDefaultSetup(env) &&
1188+
(await allowMergeConfigs())
1189+
) {
11851190
// If the FF is enabled and we are in Default Setup, combine the supported
11861191
// configuration file properties and write the result to disk.
11871192
const fromConfigInput = parseUserConfig(

0 commit comments

Comments
 (0)