Rust: special case default setup
This commit is contained in:
parent
cfedae723e
commit
1a529366ac
3 changed files with 10 additions and 3 deletions
5
lib/init-action.js
generated
5
lib/init-action.js
generated
|
|
@ -351,7 +351,10 @@ async function run() {
|
|||
const feat = feature_flags_1.Feature.RustAnalysis;
|
||||
const minVer = feature_flags_1.featureConfig[feat].minimumVersion;
|
||||
const envVar = "CODEQL_ENABLE_EXPERIMENTAL_FEATURES";
|
||||
if (await features.getValue(feat, codeql)) {
|
||||
// if in default setup, it means the feature flag was on when rust was enabled
|
||||
// if the feature flag gets turned off, let's not have rust analysis throwing a configuration error
|
||||
// in that case rust analysis will be disabled only when default setup is refreshed
|
||||
if ((0, actions_util_1.isDefaultSetup)() || (await features.getValue(feat, codeql))) {
|
||||
core.exportVariable(envVar, "true");
|
||||
}
|
||||
if (process.env[envVar] !== "true") {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -14,6 +14,7 @@ import {
|
|||
getRequiredInput,
|
||||
getTemporaryDirectory,
|
||||
persistInputs,
|
||||
isDefaultSetup,
|
||||
} from "./actions-util";
|
||||
import { getGitHubVersion } from "./api-client";
|
||||
import {
|
||||
|
|
@ -581,7 +582,10 @@ async function run() {
|
|||
const feat = Feature.RustAnalysis;
|
||||
const minVer = featureConfig[feat].minimumVersion as string;
|
||||
const envVar = "CODEQL_ENABLE_EXPERIMENTAL_FEATURES";
|
||||
if (await features.getValue(feat, codeql)) {
|
||||
// if in default setup, it means the feature flag was on when rust was enabled
|
||||
// if the feature flag gets turned off, let's not have rust analysis throwing a configuration error
|
||||
// in that case rust analysis will be disabled only when default setup is refreshed
|
||||
if (isDefaultSetup() || (await features.getValue(feat, codeql))) {
|
||||
core.exportVariable(envVar, "true");
|
||||
}
|
||||
if (process.env[envVar] !== "true") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue