Merge pull request #503 from github/hmakholm/pr/warn-magic-names
Add warnings about CLI hack to codeql.ts
This commit is contained in:
commit
21830ef0c1
3 changed files with 27 additions and 1 deletions
12
lib/codeql.js
generated
12
lib/codeql.js
generated
|
|
@ -312,6 +312,12 @@ function getCodeQLForCmd(cmd) {
|
|||
},
|
||||
async getTracerEnv(databasePath) {
|
||||
// Write tracer-env.js to a temp location.
|
||||
// BEWARE: The name and location of this file is recognized by `codeql database
|
||||
// trace-command` in order to enable special support for concatenable tracer
|
||||
// configurations. Consequently the name must not be changed.
|
||||
// (This warning can be removed once a different way to recognize the
|
||||
// action/runner has been implemented in `codeql database trace-command`
|
||||
// _and_ is present in the latest supported CLI release.)
|
||||
const tracerEnvJs = path.resolve(databasePath, "working", "tracer-env.js");
|
||||
fs.mkdirSync(path.dirname(tracerEnvJs), { recursive: true });
|
||||
fs.writeFileSync(tracerEnvJs, `
|
||||
|
|
@ -326,6 +332,12 @@ function getCodeQLForCmd(cmd) {
|
|||
}
|
||||
process.stdout.write(process.argv[2]);
|
||||
fs.writeFileSync(process.argv[2], JSON.stringify(env), 'utf-8');`);
|
||||
// BEWARE: The name and location of this file is recognized by `codeql database
|
||||
// trace-command` in order to enable special support for concatenable tracer
|
||||
// configurations. Consequently the name must not be changed.
|
||||
// (This warning can be removed once a different way to recognize the
|
||||
// action/runner has been implemented in `codeql database trace-command`
|
||||
// _and_ is present in the latest supported CLI release.)
|
||||
const envFile = path.resolve(databasePath, "working", "env.tmp");
|
||||
await new toolrunner.ToolRunner(cmd, [
|
||||
"database",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -508,11 +508,18 @@ function getCodeQLForCmd(cmd: string): CodeQL {
|
|||
},
|
||||
async getTracerEnv(databasePath: string) {
|
||||
// Write tracer-env.js to a temp location.
|
||||
// BEWARE: The name and location of this file is recognized by `codeql database
|
||||
// trace-command` in order to enable special support for concatenable tracer
|
||||
// configurations. Consequently the name must not be changed.
|
||||
// (This warning can be removed once a different way to recognize the
|
||||
// action/runner has been implemented in `codeql database trace-command`
|
||||
// _and_ is present in the latest supported CLI release.)
|
||||
const tracerEnvJs = path.resolve(
|
||||
databasePath,
|
||||
"working",
|
||||
"tracer-env.js"
|
||||
);
|
||||
|
||||
fs.mkdirSync(path.dirname(tracerEnvJs), { recursive: true });
|
||||
fs.writeFileSync(
|
||||
tracerEnvJs,
|
||||
|
|
@ -530,7 +537,14 @@ function getCodeQLForCmd(cmd: string): CodeQL {
|
|||
fs.writeFileSync(process.argv[2], JSON.stringify(env), 'utf-8');`
|
||||
);
|
||||
|
||||
// BEWARE: The name and location of this file is recognized by `codeql database
|
||||
// trace-command` in order to enable special support for concatenable tracer
|
||||
// configurations. Consequently the name must not be changed.
|
||||
// (This warning can be removed once a different way to recognize the
|
||||
// action/runner has been implemented in `codeql database trace-command`
|
||||
// _and_ is present in the latest supported CLI release.)
|
||||
const envFile = path.resolve(databasePath, "working", "env.tmp");
|
||||
|
||||
await new toolrunner.ToolRunner(cmd, [
|
||||
"database",
|
||||
"trace-command",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue