fix value escaping in codeql-env.sh

This commit is contained in:
Henning Makholm 2021-05-05 19:57:44 +02:00
parent 46d0d277ef
commit e7e64d59be
3 changed files with 3 additions and 3 deletions

View file

@ -249,7 +249,7 @@ program
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(/\$/g, "\\$")}"`
([key, value]) => `export ${key}='${value.replace(/'/g, "'\"'\"'")}'`
)
.join("\n");
fs.writeFileSync(shEnvFile, shEnvFileContents);