diff --git a/sdk/src/compile/cargo.rs b/sdk/src/compile/cargo.rs index 07913d3f4..1fba55a3b 100644 --- a/sdk/src/compile/cargo.rs +++ b/sdk/src/compile/cargo.rs @@ -89,8 +89,8 @@ impl Compile for Compiler { let prog = self.binary.as_str(); let mut dest = match std::env::var_os("OUT_DIR") { - Some(path) => path.into_string().unwrap(), - None => "/tmp/nexus-target".into(), + Some(path) => path.into_string().unwrap_or_else(|_| "/tmp/nexus-target".to_string()), + None => "/tmp/nexus-target".to_string(), }; if self.unique {