(source = process.env)
| 70 | } |
| 71 | |
| 72 | export function dockerClientEnvironment(source = process.env) { |
| 73 | const names = ["DOCKER_HOST", "DOCKER_CONTEXT"]; |
| 74 | return Object.fromEntries( |
| 75 | names |
| 76 | .filter((name) => source[name] !== undefined) |
| 77 | .map((name) => [name, source[name]]), |
| 78 | ); |
| 79 | } |
| 80 | |
| 81 | export function spawnResult(command, args, options = {}) { |
| 82 | const child = spawn(command, args, { shell: false, ...options }); |