Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extendEnv does not work when combined with shell: true #183

Closed
ehmicky opened this issue Mar 6, 2019 · 1 comment
Closed

extendEnv does not work when combined with shell: true #183

ehmicky opened this issue Mar 6, 2019 · 1 comment

Comments

@ehmicky
Copy link
Collaborator

ehmicky commented Mar 6, 2019

The extendEnv option does not work as intended when combined with the shell: true option:

process.env.TEST = 'test'
const result = execa.sync('echo $TEST', { shell: true, env: {}, extendEnv: true })
assert.equal(result.stdout, 'test')

stdout is an empty string but should be 'test'

I will work on a PR to fix this.

@ehmicky
Copy link
Collaborator Author

ehmicky commented Mar 6, 2019

I've opened a PR at #184

sindresorhus pushed a commit that referenced this issue Mar 6, 2019
Fixes #183 

Options parsing was not correct for the `extendEnv` option which made it not work when combined with `shell: true` option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant