accommodate new scoping rules in libstd unit tests.

This commit is contained in:
Felix S. Klock II 2015-01-26 15:39:56 +01:00
parent 70192ab779
commit 2c2f0f1216
1 changed files with 1 additions and 1 deletions

View File

@ -1079,13 +1079,13 @@ mod tests {
#[test]
fn test_override_env() {
use os;
let mut new_env = vec![("RUN_TEST_NEW_ENV", "123")];
// In some build environments (such as chrooted Nix builds), `env` can
// only be found in the explicitly-provided PATH env variable, not in
// default places such as /bin or /usr/bin. So we need to pass through
// PATH to our sub-process.
let path_val: String;
let mut new_env = vec![("RUN_TEST_NEW_ENV", "123")];
match os::getenv("PATH") {
None => {}
Some(val) => {