mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Auto merge of #79797 - jethrogb:sgx-fix-79038, r=Mark-Simulacrum
Fix SGX CI, take 3 Broken in #79038 r? `@Mark-Simulacrum` I actually ran `./x.py test --target x86_64-fortanix-unknown-sgx` on the commit before submitting it this time.
This commit is contained in:
commit
3d6705aa5a
@ -78,9 +78,11 @@ fn test_env_set_var() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(any(target_os = "emscripten", target_env = "sgx"), ignore)]
|
||||
#[cfg_attr(not(any(unix, windows)), ignore, allow(unused))]
|
||||
#[allow(deprecated)]
|
||||
fn env_home_dir() {
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn var_to_os_string(var: Result<String, VarError>) -> Option<OsString> {
|
||||
match var {
|
||||
Ok(var) => Some(OsString::from(var)),
|
||||
@ -91,8 +93,6 @@ 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");
|
||||
@ -110,8 +110,6 @@ 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"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user