Skip to content

Commit

Permalink
misc: add tip to resolve virtual package issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-arts committed Sep 20, 2023
1 parent 0d0ccd0 commit 22fa3c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/virtual_packages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ pub fn verify_current_platform_has_required_virtual_packages(
}

if req_pkg.version > local_vpkg.version {
miette::bail!("The current system has a mismatching virtual package. The project requires '{}' to be at least version '{}' but the system has version '{}'", req_pkg.name.as_source(), req_pkg.version, local_vpkg.version);
// This case can simply happen because the default system requirements in get_minimal_virtual_packages() is higher than required.
miette::bail!("The current system has a mismatching virtual package. The project requires '{}' to be at least version '{}' but the system has version '{}'\n\n\
Try setting the following in your pixi.toml:\n\
[system-requirements]\n\
{} = \"{}\"", req_pkg.name.as_source(), req_pkg.version, local_vpkg.version, req_pkg.name.as_normalized().strip_prefix("__").unwrap_or(local_vpkg.name.as_normalized()), local_vpkg.version);
}
} else {
miette::bail!("The platform you are running on should at least have the virtual package {} on version {}, build_string: {}", req_pkg.name.as_source(), req_pkg.version, req_pkg.build_string)
Expand Down

0 comments on commit 22fa3c4

Please sign in to comment.