vagrant icon indicating copy to clipboard operation
vagrant copied to clipboard

virtualbox version detection: handle WARNING lines

Open paulcacheux opened this issue 1 year ago • 1 comments
trafficstars

As reported in https://www.virtualbox.org/ticket/22060, starting with Virtualbox 7.0.16 running:

$ vboxmanage --version
WARNING: Environment variable LOGNAME or USER does not correspond to effective user id.
7.0.18r162988

the warning line is written to stdout which is an issue since the parsing of the version is used in the provider code to use the correct class to handle following communication with Virtualbox.

This PR improves the version detection by parsing the version in the first line that does not start with WARNING:.

paulcacheux avatar May 20 '24 12:05 paulcacheux

@chrisroberts would you mind taking a look at this? Thanks a lot 👍

paulcacheux avatar May 22 '24 17:05 paulcacheux