Skip to content

Commit

Permalink
Only show advice to use cargo update --precise for non-local packages
Browse files Browse the repository at this point in the history
Packages in the local workspace can't get updated this way; the user
just needs to point to a different source, or otherwise update the
package themselves.
  • Loading branch information
joshtriplett committed Aug 2, 2022
1 parent 0b002e4 commit 2e44a65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cargo/ops/cargo_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ pub fn create_bcx<'a, 'cfg>(
} else {
String::new()
}
} else {
} else if !ws.is_local() {
format!(
"Either upgrade to rustc {} or newer, or use\n\
cargo update -p {}@{} --precise ver\n\
Expand All @@ -678,6 +678,8 @@ pub fn create_bcx<'a, 'cfg>(
unit.pkg.name(),
current_version,
)
} else {
String::new()
};

anyhow::bail!(
Expand Down

0 comments on commit 2e44a65

Please sign in to comment.