Skip to content
Merged
Show file tree
Hide file tree
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/bin/upgrade/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ fn exec(args: UpgradeArgs) -> CargoResult<()> {
cmd.arg("--package").arg(dep);
// If we're going to request an update, it would have already been done by now
cmd.arg("--offline");
log::trace!("Running {cmd:?}");
let output = cmd.output().context("failed to lock to precise version")?;
if !output.status.success() {
return Err(anyhow::format_err!(
Expand Down Expand Up @@ -547,6 +548,7 @@ fn exec(args: UpgradeArgs) -> CargoResult<()> {
}
// If we're going to request an update, it would have already been done by now
cmd.arg("--offline");
log::trace!("Running {cmd:?}");
let status = cmd.status().context("recursive dependency update failed")?;
if !status.success() {
anyhow::bail!("recursive dependency update failed");
Expand Down Expand Up @@ -583,6 +585,7 @@ fn exec(args: UpgradeArgs) -> CargoResult<()> {
// If we're going to request an update, it would have already been done by now
cmd.arg("--offline");
if still_run {
log::trace!("Running {cmd:?}");
let status = cmd.status().context("recursive dependency update failed")?;
if !status.success() {
anyhow::bail!("recursive dependency update failed");
Expand Down
4 changes: 2 additions & 2 deletions src/dependency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,8 @@ impl std::fmt::Display for Dependency {

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

relpath.to_str().unwrap().replace('\\', "/")
}

/// Primary location of a dependency
Expand Down
Loading