(env)
| 90 | |
| 91 | /** Build an exec function bound to a specific environment. */ |
| 92 | export function makeExec(env) { |
| 93 | return (cmd, args) => |
| 94 | new Promise((resolve) => { |
| 95 | execFile(cmd, args, { timeout: 3500, windowsHide: true, env }, (error, stdout, stderr) => { |
| 96 | resolve({ error: error || null, stdout: String(stdout || ""), stderr: String(stderr || "") }); |
| 97 | }); |
| 98 | }); |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * Expand a shell-style JAVA_HOME value from an rc assignment into a concrete path, |
no outgoing calls
no test coverage detected