Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/src/compile/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ impl Compile for Compiler<CargoPackager> {
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()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice to make this more robust, but if this path is invalidly set we should return a BuildError (rather than panicking), not fall back to the default.

None => "/tmp/nexus-target".to_string(),
};

if self.unique {
Expand Down