test(installer): pin 'unparseable version = Config' behavior + document IsNewer limits
This commit is contained in:
@@ -32,6 +32,13 @@ public sealed class InstallModeDetector
|
||||
return new DetectedState(InstallerMode.Config, manifest, release, latestVersion);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true only when both versions parse as System.Version (major.minor[.build[.revision]])
|
||||
/// AND latest > current. Semver pre-release tags like "0.2.0-beta" fail to parse and are
|
||||
/// treated as "not newer" — the user drops into Config mode with no update offered.
|
||||
/// This is deliberate: offering an update we can't compare is worse than silently skipping it.
|
||||
/// If the project starts shipping pre-release tags, revisit this.
|
||||
/// </summary>
|
||||
private static bool IsNewer(string latest, string current)
|
||||
{
|
||||
if (!Version.TryParse(latest, out var lv)) return false;
|
||||
|
||||
Reference in New Issue
Block a user