fix exporting env vars on linux
This commit is contained in:
parent
e9bfa56061
commit
688df282cd
3 changed files with 5 additions and 3 deletions
3
lib/runner.js
generated
3
lib/runner.js
generated
|
|
@ -103,7 +103,8 @@ program
|
|||
// Assume that anything that's not windows is using a unix-style shell
|
||||
const envFile = path.join(config.tempDir, 'codeql-env.sh');
|
||||
const envFileContents = Object.entries(tracerConfig.env)
|
||||
.map(([key, value]) => `${key}="${value}"`)
|
||||
// Some vars contain ${LIB} that we do not want to be expanded when executing this script
|
||||
.map(([key, value]) => `export ${key}="${value.replace('$', '\\$')}"`)
|
||||
.join('\n');
|
||||
fs.writeFileSync(envFile, envFileContents);
|
||||
logger.info(`\nCodeQL environment outputted to "${envFile}". ` +
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue