Skip to content

Commit

Permalink
Do not truncate Version on level
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
  • Loading branch information
jjerphan committed Feb 12, 2025
1 parent 7ed1ee8 commit e5b4440
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 1 addition & 6 deletions libmamba/src/specs/version_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,7 @@ fmt::formatter<mamba::specs::VersionPredicate>::format(
}
if constexpr (std::is_same_v<Op, VersionPredicate::compatible_with>)
{
out = fmt::format_to(
out,
"{}{}",
VersionSpec::compatible_str,
pred.m_version.str(op.level)
);
out = fmt::format_to(out, "{}{}", VersionSpec::compatible_str, pred.m_version.str());
}
},
pred.m_operator
Expand Down
1 change: 1 addition & 0 deletions libmamba/tests/src/specs/test_version_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ namespace
REQUIRE_FALSE("~=1.7"_vs.contains("1"_v));
REQUIRE_FALSE("~=1.7"_vs.contains("1.6.0"_v));
REQUIRE_FALSE("~=1.7"_vs.contains("0.1.0"_v));
REQUIRE("~=1.7.0"_vs.str() == "~=1.7.0");

REQUIRE("~= 4.41"_vs.contains("4.41"_v));
REQUIRE("~= 4.41"_vs.contains("4.41.0"_v));
Expand Down

0 comments on commit e5b4440

Please sign in to comment.