Skip to content

Commit

Permalink
fix check
Browse files Browse the repository at this point in the history
  • Loading branch information
swolchok committed Jul 23, 2019
1 parent ccb5d0a commit a4ff823
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librustc_target/spec/apple_ios_base.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::env;
use std::io;
use std::path::Path;
use std::process::Command;
use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions};

Expand Down Expand Up @@ -29,7 +30,7 @@ impl Arch {

pub fn get_sdk_root(sdk_name: &str) -> Result<String, String> {
if let Some(sdkroot) = env::var("SDKROOT").ok() {
let sdkroot_path = Path::new(sdkroot);
let sdkroot_path = Path::new(&sdkroot);
if sdkroot_path.is_absolute() && sdkroot_path != Path::new("/") && sdkroot_path.exists() {
return Ok(sdkroot);
}
Expand Down

0 comments on commit a4ff823

Please sign in to comment.