Remove local environment running

This is a functionality that never worked perfectly and hasn't been
used for a while.

This allows developers to run the action on their local machine, but
the run was always flaky and never 100% mirrored what was happening on
the actions runner.
This commit is contained in:
Andrew Eisenberg
2021-06-01 15:04:15 -07:00
parent 3708898bf2
commit 2c2ebdc5c5
19 changed files with 21 additions and 262 deletions

View File

@@ -6,7 +6,6 @@ import { Readable } from "stream";
import * as core from "@actions/core";
import * as semver from "semver";
import { prepareLocalRunEnvironment } from "./actions-util";
import { getApiClient, GitHubApiDetails } from "./api-client";
import * as apiCompatibility from "./api-compatibility.json";
import { Config } from "./config-utils";
@@ -36,16 +35,6 @@ export function getExtraOptionsEnvParam(): object {
}
}
export function isLocalRun(): boolean {
return (
!!process.env.CODEQL_LOCAL_RUN &&
process.env.CODEQL_LOCAL_RUN !== "false" &&
process.env.CODEQL_LOCAL_RUN !== "0" &&
// local runs only allowed for actions
isActions()
);
}
/**
* Get the array of all the tool names contained in the given sarif contents.
*
@@ -444,7 +433,6 @@ export function initializeEnvironment(mode: Mode, version: string) {
core.exportVariable(EnvVar.FEATURE_MULTI_LANGUAGE, "true");
core.exportVariable(EnvVar.FEATURE_SANDWICH, "true");
prepareLocalRunEnvironment();
} else {
process.env[EnvVar.RUN_MODE] = mode;
process.env[EnvVar.VERSION] = version;