Skip to content

Commit

Permalink
Make this weird case a fatal error rather.
Browse files Browse the repository at this point in the history
I don't think this code is reachable in normal circumstances, Scott
pointed out that it could be a result of a change in CLI output or
localization differences in output. With that in mind, it makes more
sense to error in these cases since if the package is installed but at an unknowable version we should stop and make the user figure it out.
  • Loading branch information
nuclearsandwich committed Apr 25, 2024
1 parent e47f96d commit eb00797
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recipes/jenkins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@

version_line = jenkins_info.lines.select{|line| line =~ /^Version: /}.first
if version_line.nil?
return false
Chef::Log.fatal("Could not determine Jenkins version from dpkg but it does seem installed.")
raise
end

# Transform "Version: 2.319.1\n" to ["2", "319", "1"]
Expand Down

0 comments on commit eb00797

Please sign in to comment.