From 0438c5fbe2f20b710f9b5f747bc2486d80bdf7ad Mon Sep 17 00:00:00 2001 From: Steffen Deusch Date: Thu, 2 Jan 2025 15:20:04 +0100 Subject: [PATCH] Allow pre-release versions in attached runtime version check (#2905) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jonatan Kłosko --- lib/livebook/runtime/attached.ex | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/livebook/runtime/attached.ex b/lib/livebook/runtime/attached.ex index c8a765cd4..e834a449f 100644 --- a/lib/livebook/runtime/attached.ex +++ b/lib/livebook/runtime/attached.ex @@ -91,8 +91,13 @@ defmodule Livebook.Runtime.Attached do # changes are unlikely within the same minor version, so that's # the requirement we enforce. - current = Version.parse!(System.version()) - same_minor = "#{current.major}.#{current.minor}.0" + current = System.version() + + same_minor = + current + |> Version.parse!() + |> Map.replace!(:patch, 0) + |> Version.to_string() # Make sure Livebook does not enforce a higher patch version min_version =