Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/src/tracer-env.ts
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Chris Gavin
Convert all 4-space indented files to 2-space.
12 lines (11 sloc)
366 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from 'fs'; | |
const env = {}; | |
for (let entry of Object.entries(process.env)) { | |
const key = entry[0]; | |
const value = entry[1]; | |
if (typeof value !== 'undefined' && key !== '_' && !key.startsWith('JAVA_MAIN_CLASS_')) { | |
env[key] = value; | |
} | |
} | |
process.stdout.write(process.argv[2]); | |
fs.writeFileSync(process.argv[2], JSON.stringify(env), 'utf-8'); |