Skip to content

Commit

Permalink
virtualbox version detection: handle WARNING lines
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed May 20, 2024
1 parent faf9014 commit f67d4f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/providers/virtualbox/driver/meta.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ def read_version
end
end

parts = output.split("_")
version_line = output.each_line.find do |line|
!line.start_with?("WARNING:")
end

parts = version_line.split("_")
return nil if parts.empty?
parts[0].split("r")[0]
end
Expand Down

0 comments on commit f67d4f7

Please sign in to comment.