Feature/add env vars before running#16
Conversation
kenr
commented
May 19, 2021
- Add support for adding environment variables before running script
|
@kenr thanks a lot for the PR. Command::new("ls")
.env("PATH", "/bin")
.spawn()
.expect("ls command failed to start");that way, only the child process will have those env vars and parent process is not affected at all. |
Codecov Report
@@ Coverage Diff @@
## master #16 +/- ##
==========================================
+ Coverage 92.40% 93.67% +1.26%
==========================================
Files 6 6
Lines 395 411 +16
==========================================
+ Hits 365 385 +20
+ Misses 30 26 -4
Continue to review full report at Codecov.
|
|
@sagiegurari I agree with you, the parent should not be polluted with the environment variables in options. |
|
excellent work!!! thanks a lot. |