Skip to content

Commit

Permalink
Merge pull request #13394 from paulcacheux/fix-virtualbox-7-version-d…
Browse files Browse the repository at this point in the history
…etection

virtualbox version detection: handle WARNING lines
  • Loading branch information
chrisroberts authored Jul 10, 2024
2 parents ad62710 + 67599f8 commit 4b7a465
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.to_s.split("_")
return nil if parts.empty?
parts[0].split("r")[0]
end
Expand Down

0 comments on commit 4b7a465

Please sign in to comment.