Replace all occurrences

This commit is contained in:
Robert Brignull 2020-09-14 18:13:04 +01:00
parent 245c02cf7d
commit 89dad149ed
3 changed files with 5 additions and 3 deletions

2
lib/runner.js generated
View file

@ -158,7 +158,7 @@ program
const shEnvFile = path.join(config.tempDir, "codeql-env.sh");
const shEnvFileContents = Object.entries(tracerConfig.env)
// Some vars contain ${LIB} that we do not want to be expanded when executing this script
.map(([key, value]) => `export ${key}="${value.replace("$", "\\$")}"`)
.map(([key, value]) => `export ${key}="${value.replace(/\$/g, "\\$")}"`)
.join("\n");
fs.writeFileSync(shEnvFile, shEnvFileContents);
logger.info(`\nCodeQL environment output to "${jsonEnvFile}" and "${shEnvFile}". ` +