Inserts or updates an environment variable mapping. Note that environment variable names are case-insensitive (but case-preserving) on Windows, and case-sensitive on all other platforms.
(&mut self, key: impl Into<OsString>, val: impl Into<OsString>)
| 392 | /// Note that environment variable names are case-insensitive (but case-preserving) on Windows, |
| 393 | /// and case-sensitive on all other platforms. |
| 394 | pub fn env(&mut self, key: impl Into<OsString>, val: impl Into<OsString>) -> &mut Self { |
| 395 | self.as_mut().env.insert(key.into(), val.into()); |
| 396 | self |
| 397 | } |
| 398 | |
| 399 | /// Same as `cmd.spawn()?.wait()` |
| 400 | /// See [`Child::wait()`] for details. |