Skip to content

Commit

Permalink
Allow pre-release versions in attached runtime version check (#2905)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonatan Kłosko <[email protected]>
  • Loading branch information
SteffenDE and jonatanklosko authored Jan 2, 2025
1 parent 77f2948 commit 0438c5f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/livebook/runtime/attached.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 0438c5f

Please sign in to comment.