address review comments
This commit is contained in:
parent
6f422a4303
commit
1fd45d7407
9 changed files with 147 additions and 149 deletions
34
lib/init.js
generated
34
lib/init.js
generated
|
|
@ -40,24 +40,22 @@ async function runInit(codeql, config) {
|
|||
await codeql.databaseInit(util.getCodeQLDatabasePath(config.tempDir, language), language, sourceRoot);
|
||||
}
|
||||
const tracerConfig = await tracer_config_1.getCombinedTracerConfig(config, codeql);
|
||||
if (tracerConfig !== undefined) {
|
||||
if (process.platform === 'win32') {
|
||||
const injectTracerPath = path.join(config.tempDir, 'inject-tracer.ps1');
|
||||
fs.writeFileSync(injectTracerPath, `
|
||||
Param(
|
||||
[Parameter(Position=0)]
|
||||
[String]
|
||||
$tracer
|
||||
)
|
||||
Get-Process -Name Runner.Worker
|
||||
$process=Get-Process -Name Runner.Worker
|
||||
$id=$process.Id
|
||||
Invoke-Expression "&$tracer --inject=$id"`);
|
||||
await exec.exec('powershell', [
|
||||
injectTracerPath,
|
||||
path.resolve(path.dirname(codeql.getPath()), 'tools', 'win64', 'tracer.exe'),
|
||||
], { env: { 'ODASA_TRACER_CONFIGURATION': tracerConfig.spec } });
|
||||
}
|
||||
if (tracerConfig !== undefined && process.platform === 'win32') {
|
||||
const injectTracerPath = path.join(config.tempDir, 'inject-tracer.ps1');
|
||||
fs.writeFileSync(injectTracerPath, `
|
||||
Param(
|
||||
[Parameter(Position=0)]
|
||||
[String]
|
||||
$tracer
|
||||
)
|
||||
Get-Process -Name Runner.Worker
|
||||
$process=Get-Process -Name Runner.Worker
|
||||
$id=$process.Id
|
||||
Invoke-Expression "&$tracer --inject=$id"`);
|
||||
await exec.exec('powershell', [
|
||||
injectTracerPath,
|
||||
path.resolve(path.dirname(codeql.getPath()), 'tools', 'win64', 'tracer.exe'),
|
||||
], { env: { 'ODASA_TRACER_CONFIGURATION': tracerConfig.spec } });
|
||||
}
|
||||
return tracerConfig;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue