Rollup merge of #79602 - jethrogb:sgx-fix-79038, r=Mark-Simulacrum

Fix SGX CI

Broken in #79038
This commit is contained in:
Dylan DPC 2020-12-04 03:30:25 +01:00 committed by GitHub
commit 6b42900e40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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};
@ -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");
@ -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"));