Skip to content

Commit

Permalink
fix(runProcess): Ensure that environment variables are inherited
Browse files Browse the repository at this point in the history
  • Loading branch information
vinsonchuong committed Sep 4, 2020
1 parent 9ffa6c5 commit 90871a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion run-process/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ export default function (
t,
{command: [command, ...args], env = {}, cwd = process.cwd()}
) {
const child = spawn(command, args, {env, cwd, detached: true})
const child = spawn(command, args, {
env: {...process.env, ...env},
cwd,
detached: true
})
t.teardown(() => {
process.kill(-child.pid)
})
Expand Down

0 comments on commit 90871a1

Please sign in to comment.