Describe the bug
wexpect.spawn takes an optional parameter env but doesn't propagate those env vars it to the child process.
To Reproduce
Steps to reproduce the behavior:
Run the following script:
p = wexpect.spawn('cmd', env={'NAME': 'VALUE'})
p.expect('>')
p.sendline('echo %NAME%')
p.expect('>')
print(p.before.splitlines()[1])
Observed output: %NAME%
Expected behavior
VALUE is output
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
Additional context
None