Skip to content

Commit

Permalink
Rollup merge of rust-lang#79602 - jethrogb:sgx-fix-79038, r=Mark-Simu…
Browse files Browse the repository at this point in the history
…lacrum

Fix SGX CI

Broken in rust-lang#79038
  • Loading branch information
Dylan-DPC authored Dec 4, 2020
2 parents f406052 + b787d72 commit 6b42900
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/std/tests/env.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::env::*;
use std::ffi::{OsStr, OsString};
use std::path::PathBuf;

use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
Expand Down Expand Up @@ -92,6 +91,8 @@ fn env_home_dir() {

cfg_if::cfg_if! {
if #[cfg(unix)] {
use std::path::PathBuf;

let oldhome = var_to_os_string(var("HOME"));

set_var("HOME", "/home/MountainView");
Expand All @@ -109,6 +110,8 @@ fn env_home_dir() {

if let Some(oldhome) = oldhome { set_var("HOME", oldhome); }
} else if #[cfg(windows)] {
use std::path::PathBuf;

let oldhome = var_to_os_string(var("HOME"));
let olduserprofile = var_to_os_string(var("USERPROFILE"));

Expand Down

0 comments on commit 6b42900

Please sign in to comment.