Skip to content

Commit 851a7e7

Browse files
authored
Merge pull request #940 from epage/log
fix: Log commands for better debugging
2 parents 42e15fa + 51eaa1e commit 851a7e7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/bin/upgrade/upgrade.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ fn exec(args: UpgradeArgs) -> CargoResult<()> {
504504
cmd.arg("--package").arg(dep);
505505
// If we're going to request an update, it would have already been done by now
506506
cmd.arg("--offline");
507+
log::trace!("Running {cmd:?}");
507508
let output = cmd.output().context("failed to lock to precise version")?;
508509
if !output.status.success() {
509510
return Err(anyhow::format_err!(
@@ -547,6 +548,7 @@ fn exec(args: UpgradeArgs) -> CargoResult<()> {
547548
}
548549
// If we're going to request an update, it would have already been done by now
549550
cmd.arg("--offline");
551+
log::trace!("Running {cmd:?}");
550552
let status = cmd.status().context("recursive dependency update failed")?;
551553
if !status.success() {
552554
anyhow::bail!("recursive dependency update failed");
@@ -583,6 +585,7 @@ fn exec(args: UpgradeArgs) -> CargoResult<()> {
583585
// If we're going to request an update, it would have already been done by now
584586
cmd.arg("--offline");
585587
if still_run {
588+
log::trace!("Running {cmd:?}");
586589
let status = cmd.status().context("recursive dependency update failed")?;
587590
if !status.success() {
588591
anyhow::bail!("recursive dependency update failed");

src/dependency.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,8 @@ impl std::fmt::Display for Dependency {
561561

562562
fn path_field(crate_root: &Path, abs_path: &Path) -> String {
563563
let relpath = pathdiff::diff_paths(abs_path, crate_root).expect("both paths are absolute");
564-
let relpath = relpath.to_str().unwrap().replace('\\', "/");
565-
relpath
564+
565+
relpath.to_str().unwrap().replace('\\', "/")
566566
}
567567

568568
/// Primary location of a dependency

0 commit comments

Comments
 (0)