diff options
author | Ruben Arts <ruben.arts@hotmail.com> | 2023-09-20 19:48:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-20 19:48:49 +0200 |
commit | a09f4b9f4e96529dd7a33f65e7598640dec5fc51 (patch) | |
tree | 7b614275333d61b14461c1936c279a603bb1f791 | |
parent | 0d0ccd0097c7cb5a65b9aaedc37cbddaffc7f7fb (diff) |
misc: add tip to resolve virtual package issue (#348)
Add tip to the error of a to low local system requirement.
closes #346
-rw-r--r-- | src/virtual_packages.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/virtual_packages.rs b/src/virtual_packages.rs index 6205708..ef0d600 100644 --- a/src/virtual_packages.rs +++ b/src/virtual_packages.rs @@ -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) |