mirror of
https://github.com/github/codeql-action.git
synced 2026-01-05 22:20:20 +08:00
fix exporting env vars on linux
This commit is contained in:
@@ -138,7 +138,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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user