Skip to content

Commit

Permalink
Suggest cargo install on pgrx version mismatch diagnostic (#1579)
Browse files Browse the repository at this point in the history
Resolves #1444
  • Loading branch information
workingjubilee authored Feb 22, 2024
1 parent 400d0c3 commit 82fe8b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cargo-pgrx/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ pub fn validate(
return Err(eyre!(
"The installed `cargo-pgrx` v{cargo_pgrx_version} \
is not compatible with the {mismatches} {} in `{}`. `cargo-pgrx` \
and pgrx dependency versions must be identical.",
and pgrx dependency versions must be identical.
{help} cargo install --version {mismatches} --locked",
if many == 1 { "dependency" } else { "dependencies" },
path.map(|p| p.as_ref().display().to_string())
.unwrap_or_else(|| "./Cargo.toml".to_string())
.yellow()
.yellow(),
help = "help:".to_string().bold()
));
}

Expand Down

0 comments on commit 82fe8b1

Please sign in to comment.