mirror of
https://github.com/github/codeql-action.git
synced 2026-01-01 20:20:07 +08:00
13 lines
366 B
TypeScript
13 lines
366 B
TypeScript
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');
|