@@ -298,31 +298,6 @@ export async function getCodeQLSource(
298
298
} ;
299
299
}
300
300
301
- /**
302
- * Whether the tools shipped with the Action, i.e. those in `defaults.json`, have been forced.
303
- *
304
- * We use the special value of 'linked' to prioritize the version in `defaults.json` over the
305
- * version specified by the feature flags on Dotcom and over any pinned cached version on
306
- * Enterprise Server.
307
- *
308
- * Previously we have been using 'latest' to force the shipped tools, but this was not clear
309
- * enough for the users, so it has been changed to `linked`. We're keeping around `latest` for
310
- * backwards compatibility.
311
- */
312
- const forceShippedTools =
313
- toolsInput && CODEQL_BUNDLE_VERSION_ALIAS . includes ( toolsInput ) ;
314
- if ( forceShippedTools ) {
315
- logger . info (
316
- `'tools: ${ toolsInput } ' was requested, so using CodeQL version ${ defaultCliVersion . cliVersion } , the version shipped with the Action.` ,
317
- ) ;
318
-
319
- if ( toolsInput === "latest" ) {
320
- logger . warning (
321
- "`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required." ,
322
- ) ;
323
- }
324
- }
325
-
326
301
/** CLI version number, for example 2.12.6. */
327
302
let cliVersion : string | undefined ;
328
303
/** Tag name of the CodeQL bundle, for example `codeql-bundle-20230120`. */
@@ -344,9 +319,33 @@ export async function getCodeQLSource(
344
319
toolsInput = await getNightlyToolsUrl ( logger ) ;
345
320
}
346
321
322
+ /**
323
+ * Whether the tools shipped with the Action, i.e. those in `defaults.json`, have been forced.
324
+ *
325
+ * We use the special value of 'linked' to prioritize the version in `defaults.json` over the
326
+ * version specified by the feature flags on Dotcom and over any pinned cached version on
327
+ * Enterprise Server.
328
+ *
329
+ * Previously we have been using 'latest' to force the shipped tools, but this was not clear
330
+ * enough for the users, so it has been changed to `linked`. We're keeping around `latest` for
331
+ * backwards compatibility.
332
+ */
333
+ const forceShippedTools =
334
+ toolsInput && CODEQL_BUNDLE_VERSION_ALIAS . includes ( toolsInput ) ;
335
+
347
336
if ( forceShippedTools ) {
348
337
cliVersion = defaults . cliVersion ;
349
338
tagName = defaults . bundleVersion ;
339
+
340
+ logger . info (
341
+ `'tools: ${ toolsInput } ' was requested, so using CodeQL version ${ cliVersion } , the version shipped with the Action.` ,
342
+ ) ;
343
+
344
+ if ( toolsInput === "latest" ) {
345
+ logger . warning (
346
+ "`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required." ,
347
+ ) ;
348
+ }
350
349
} else if ( toolsInput !== undefined ) {
351
350
// If a tools URL was provided, then use that.
352
351
tagName = tryGetTagNameFromUrl ( toolsInput , logger ) ;
0 commit comments