Skip to content

Commit

Permalink
fix: preserve workspace inherited dependencies when building binary
Browse files Browse the repository at this point in the history
fix #1738
  • Loading branch information
HerringtonDarkholme committed Aug 17, 2023
1 parent 4c3d5c2 commit c85faa1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/source_distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,13 @@ fn rewrite_dependencies_path(
// Cargo.toml contains relative paths, and we're already in LOCAL_DEPENDENCIES_FOLDER
toml_edit::value(format!("../{dep_name}"))
};
if workspace_inherit {
// Remove workspace inheritance now that we converted it into a path dependency
dep_table[&dep_name]
.as_table_like_mut()
.unwrap()
.remove("workspace");
}
rewritten = true;
}
}
Expand Down

0 comments on commit c85faa1

Please sign in to comment.