()
| 54 | const child = spawn(processName, args, { env: { ...process.env, ...config.additionalEnvVars } }) |
| 55 | |
| 56 | const sendDSLToSubprocess = () => { |
| 57 | if (exec.options.passURLForDSL) { |
| 58 | const filename = `danger-dsl-${randomBytes(4).toString("hex")}.json` |
| 59 | const resultsPath = join(tmpdir(), filename) |
| 60 | writeFileSync(resultsPath, dslJSONString, "utf8") |
| 61 | const url = `danger://dsl/${resultsPath}` |
| 62 | d(`Started passing in STDIN via the URL: ${url}`) |
| 63 | child.stdin.write(url) |
| 64 | child.stdin.end() |
| 65 | } else { |
| 66 | d(`Started passing in STDIN`) |
| 67 | child.stdin.write(dslJSONString) |
| 68 | child.stdin.end() |
| 69 | } |
| 70 | d(`Passed DSL in via STDIN`) |
| 71 | } |
| 72 | |
| 73 | // Initial sending of the DSL |
| 74 | sendDSLToSubprocess() |
no outgoing calls
no test coverage detected