Skip to content

Commit

Permalink
fix: we also include build_dependencies
Browse files Browse the repository at this point in the history
i guess i overlooked this part. they are all mentioned
as dependencies in the https://doc.rust-lang.org/cargo/reference/manifest.html

See Dependency Table from that link.

Signed-off-by: Soc Virnyl Estela <[email protected]>
  • Loading branch information
uncomfyhalomacro committed Nov 24, 2023
1 parent cb8a9a3 commit 46560c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cargo/src/vendor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ pub fn is_workspace(src: &Path) -> Result<bool, OBSCargoError> {
struct TomlManifest {
dependencies: Option<BTreeMap<String, toml::Value>>,
dev_dependencies: Option<BTreeMap<String, toml::Value>>,
build_dependencies: Option<BTreeMap<String, toml::Value>>,
target: Option<BTreeMap<String, toml::Value>>,
}

Expand All @@ -227,6 +228,9 @@ pub fn has_dependencies(src: &Path) -> Result<bool, OBSCargoError> {
} || match manifest_data.dev_dependencies {
Some(deps) => !deps.is_empty(),
None => false,
} || match manifest_data.build_dependencies {
Some(deps) => !deps.is_empty(),
None => false,
} || match manifest_data.target {
Some(deps) => !deps.is_empty(),
None => false,
Expand Down

0 comments on commit 46560c6

Please sign in to comment.