Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve docker/parallels detection #2718

Merged
merged 2 commits into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,13 @@ end


def vvv_is_docker_present()
VagrantPlugins::DockerProvider::Driver.new.execute("docker", "version")
return true
rescue Vagrant::Errors::CommandUnavailable
return false
if `docker version`
return true
end
end

def vvv_is_parallels_present()
VagrantPlugins::DockerProvider::Driver.new.execute("prctl", "version")
return true
rescue Vagrant::Errors::CommandUnavailable
return false
return Vagrant.has_plugin?("vagrant-parallels")
end

vagrant_dir = __dir__
Expand Down Expand Up @@ -348,7 +344,7 @@ if show_logo
when 'hyperv'
provider_version = 'n/a'
when 'docker'
provider_version = VagrantPlugins::DockerProvider::Driver.new.execute("docker", "-v").gsub("Docker version ", "")
provider_version = `docker -v`.gsub("Docker version ", "")
else
provider_version = '??'
end
Expand Down
Loading