Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print dep_name instead of "dummy package" #1020

Closed
wants to merge 1 commit into from
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
6 changes: 3 additions & 3 deletions dylint/src/metadata/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ fn git_dependency_root(url: &str, details: &DetailedTomlDependency) -> Result<Pa
BTreeMap::new()
};

cargo_fetch(package.path())?;
cargo_fetch(&dep_name, package.path())?;

// smoelius: `cargo metadata` will fail if `cargo fetch` had to create a new checkouts
// subdirectory.
Expand Down Expand Up @@ -239,11 +239,11 @@ fn inject_dummy_dependencies(
Ok(injected_dependencies)
}

fn cargo_fetch(path: &Path) -> Result<()> {
fn cargo_fetch(dep_name: &str, path: &Path) -> Result<()> {
// smoelius: `cargo fetch` could fail, e.g., if a new checkouts subdirectory had to be created.
// But the command should still be executed.
// smoelius: Since stdout and stderr are captured, there is no need to use `.quiet(true)`.
let _output = dylint_internal::cargo::fetch("dummy package")
let _output = dylint_internal::cargo::fetch(&format!("`{dep_name}`"))
.stable(true)
.build()
.args([
Expand Down