diff --git a/Cargo.lock b/Cargo.lock index 612d2c2..f12bcd5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -532,9 +532,9 @@ dependencies = [ [[package]] name = "target" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1e4fbc9c74e1521bc75f7780d2546587e2ade1822f4c5107ce6e262162a2a8c" +checksum = "ba852e71502340e2eaf2fa51f9b3ec6aa25750da1aa65771491c69d67789b05c" [[package]] name = "tempfile" diff --git a/Cargo.toml b/Cargo.toml index f564133..a9b7d98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ libc = "0.2.0" log = "0.4.4" snafu = "0.6.0" strum_macros = "0.21.1" -target = "1.0.0" +target = "2.0.0" tempfile = "3.0.0" typed-arena = "2.0.1" unicode-width = "0.1.0" diff --git a/src/function.rs b/src/function.rs index 80394c1..70c619e 100644 --- a/src/function.rs +++ b/src/function.rs @@ -179,7 +179,7 @@ fn os(_context: &FunctionContext) -> Result { } fn os_family(_context: &FunctionContext) -> Result { - Ok(target::os_family().to_owned()) + Ok(target::family().to_owned()) } fn parent_directory(_context: &FunctionContext, path: &str) -> Result { diff --git a/tests/functions.rs b/tests/functions.rs index dc8be3e..62cf0d0 100644 --- a/tests/functions.rs +++ b/tests/functions.rs @@ -6,8 +6,8 @@ test! { foo: echo {{arch()}} {{os()}} {{os_family()}} "#, - stdout: format!("{} {} {}\n", target::arch(), target::os(), target::os_family()).as_str(), - stderr: format!("echo {} {} {}\n", target::arch(), target::os(), target::os_family()).as_str(), + stdout: format!("{} {} {}\n", target::arch(), target::os(), target::family()).as_str(), + stderr: format!("echo {} {} {}\n", target::arch(), target::os(), target::family()).as_str(), } test! { @@ -20,8 +20,8 @@ f := os_family() foo: echo {{a}} {{o}} {{f}} "#, - stdout: format!("{} {} {}\n", target::arch(), target::os(), target::os_family()).as_str(), - stderr: format!("echo {} {} {}\n", target::arch(), target::os(), target::os_family()).as_str(), + stdout: format!("{} {} {}\n", target::arch(), target::os(), target::family()).as_str(), + stderr: format!("echo {} {} {}\n", target::arch(), target::os(), target::family()).as_str(), } #[cfg(not(windows))] @@ -249,8 +249,8 @@ test! { foo a=arch() o=os() f=os_family(): echo {{a}} {{o}} {{f}} "#, - stdout: format!("{} {} {}\n", target::arch(), target::os(), target::os_family()).as_str(), - stderr: format!("echo {} {} {}\n", target::arch(), target::os(), target::os_family()).as_str(), + stdout: format!("{} {} {}\n", target::arch(), target::os(), target::family()).as_str(), + stderr: format!("echo {} {} {}\n", target::arch(), target::os(), target::family()).as_str(), } test! {