mirror of
https://github.com/github/codeql-action.git
synced 2026-05-22 22:08:56 +00:00
Throw if ENTERPRISE_RELEASES_PATH is not set
This commit is contained in:
@@ -14,7 +14,19 @@ import { API_COMPATIBILITY_FILE } from "./config";
|
||||
/** The first GHES version that included Code Scanning. */
|
||||
const FIRST_SUPPORTED_RELEASE: SemVer = new semver.SemVer("2.22.0");
|
||||
|
||||
function main() {}
|
||||
/** Environment variables specific to this script. */
|
||||
export enum EnvVar {
|
||||
ENTERPRISE_RELEASES_PATH = "ENTERPRISE_RELEASES_PATH",
|
||||
}
|
||||
|
||||
function main() {
|
||||
const enterpriseReleasesPath = process.env[EnvVar.ENTERPRISE_RELEASES_PATH];
|
||||
if (!enterpriseReleasesPath) {
|
||||
throw new Error(
|
||||
`${EnvVar.ENTERPRISE_RELEASES_PATH} environment variable must be set`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Only call `main` if this script was run directly.
|
||||
if (require.main === module) {
|
||||
|
||||
Reference in New Issue
Block a user