File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1098,18 +1098,17 @@ namespace mamba
10981098 return version_b.value () < version_a.value (); // Descending order
10991099 }
11001100 }
1101- else if (version_a.has_value () || version_b.has_value ())
1101+
1102+ // If only one can be parsed, prefer the parsed one
1103+ if (version_a.has_value () || version_b.has_value ())
11021104 {
1103- // If only one can be parsed, prefer the parsed one
11041105 return !version_a.has_value ();
11051106 }
1106- else
1107+
1108+ // Fallback to string comparison if parsing fails
1109+ if (record_a.version != record_b.version )
11071110 {
1108- // Fallback to string comparison if parsing fails
1109- if (record_a.version != record_b.version )
1110- {
1111- return record_b.version < record_a.version ; // Descending order
1112- }
1111+ return record_b.version < record_a.version ; // Descending order
11131112 }
11141113
11151114 // Finally compare by build number (descending - highest first)
You can’t perform that action at this time.
0 commit comments