Move initializeEnvironment out of util.ts

This commit is contained in:
Michael B. Gale
2026-10-16 22:15:06 +01:00
parent a234b846e2
commit c252c71195
17 changed files with 93 additions and 80 deletions

View File

@@ -371,6 +371,18 @@ export class Env extends ReadOnlyEnv {
}
}
/**
* Set some initial environment variables that we can set even without
* knowing what version of CodeQL we're running.
*/
public initialise(version: string) {
this.export(EnvVar.FEATURE_MULTI_LANGUAGE, "false");
this.export(EnvVar.FEATURE_SANDWICH, "false");
this.export(EnvVar.FEATURE_SARIF_COMBINE, "true");
this.export(EnvVar.FEATURE_WILL_UPLOAD, "true");
this.export(EnvVar.VERSION, version);
}
/** Gets a value indicating whether `set` was called at least once. */
public hasChanged(): boolean {
return this.changed;