Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Add an option to ignore build dependencies #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions src/args.rs
Original file line number Diff line number Diff line change
@@ -39,6 +39,9 @@ pub struct Args {
#[structopt(long = "no-dev-dependencies")]
/// Skip dev dependencies.
pub no_dev_dependencies: bool,
#[structopt(long = "no-build-dependencies")]
/// Skip build dependencies.
pub no_build_dependencies: bool,
#[structopt(long = "manifest-path", value_name = "PATH", parse(from_os_str))]
/// Path to Cargo.toml
pub manifest_path: Option<PathBuf>,
3 changes: 3 additions & 0 deletions src/graph.rs
Original file line number Diff line number Diff line change
@@ -51,6 +51,9 @@ pub fn build(args: &Args, metadata: Metadata) -> Result<Graph, Error> {
if args.no_dev_dependencies && kind == DependencyKind::Development {
continue;
}
if args.no_build_dependencies && kind == DependencyKind::Build {
continue;
}

graph.graph.add_edge(from, to, kind);
}