Skip to content

Commit

Permalink
Fixes #36741 - Check Ubuntu version more explicitly
Browse files Browse the repository at this point in the history
If no minor version is defined, the function minor.to_i makes it a "0".
Accordingly, Ubuntu 20.04 is interpreted as "no subiquity/Autoinstall" - but,
if no minor version is given, Foreman should implicitly assume "latest"
(which supports Autoinstall in fact).
  • Loading branch information
bastian-src authored and stejskalleos committed Dec 19, 2023
1 parent 70b2144 commit f109291
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/operatingsystems/debian.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def guess_os
def is_subiquity?
return false if guess_os != "ubuntu"
return false if major.to_i < 20
return false if major.to_i == 20 && minor.to_i <= 2
return false if major.to_i == 20 && minor.present? && minor.to_i <= 2
true # Ubuntu release 20.04.3 or newer
end

Expand Down

0 comments on commit f109291

Please sign in to comment.