Support YAML in CODEQL_ACTION_EXTRA_OPTIONS
This commit is contained in:
parent
6682b14bf4
commit
7e9defdf1b
3 changed files with 5 additions and 3 deletions
3
lib/util.js
generated
3
lib/util.js
generated
|
|
@ -78,6 +78,7 @@ const exec = __importStar(require("@actions/exec/lib/exec"));
|
|||
const check_disk_space_1 = __importDefault(require("check-disk-space"));
|
||||
const del_1 = __importDefault(require("del"));
|
||||
const get_folder_size_1 = __importDefault(require("get-folder-size"));
|
||||
const yaml = __importStar(require("js-yaml"));
|
||||
const semver = __importStar(require("semver"));
|
||||
const apiCompatibility = __importStar(require("./api-compatibility.json"));
|
||||
const environment_1 = require("./environment");
|
||||
|
|
@ -117,7 +118,7 @@ function getExtraOptionsEnvParam() {
|
|||
return {};
|
||||
}
|
||||
try {
|
||||
return JSON.parse(raw);
|
||||
return yaml.load(raw);
|
||||
}
|
||||
catch (unwrappedError) {
|
||||
const error = wrapError(unwrappedError);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -8,6 +8,7 @@ import * as exec from "@actions/exec/lib/exec";
|
|||
import checkDiskSpace from "check-disk-space";
|
||||
import del from "del";
|
||||
import getFolderSize from "get-folder-size";
|
||||
import * as yaml from "js-yaml";
|
||||
import * as semver from "semver";
|
||||
|
||||
import * as apiCompatibility from "./api-compatibility.json";
|
||||
|
|
@ -121,7 +122,7 @@ export function getExtraOptionsEnvParam(): object {
|
|||
return {};
|
||||
}
|
||||
try {
|
||||
return JSON.parse(raw) as object;
|
||||
return yaml.load(raw) as object;
|
||||
} catch (unwrappedError) {
|
||||
const error = wrapError(unwrappedError);
|
||||
throw new ConfigurationError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue