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

vagrant-vbguest/hosts/virtualbox.rb typo error #13404

Open
D4d0s opened this issue May 30, 2024 · 2 comments
Open

vagrant-vbguest/hosts/virtualbox.rb typo error #13404

D4d0s opened this issue May 30, 2024 · 2 comments

Comments

@D4d0s
Copy link

D4d0s commented May 30, 2024

Debug output

==> default: Attempting graceful shutdown of VM...
==> default: Destroying VM and associated drives...
/usr/share/vagrant/gems/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/hosts/virtualbox.rb:84:in `block in guess_local_iso': undefined method `exists?' for class File (NoMethodError)

            path && File.exists?(path)
                        ^^^^^^^^

Expected behavior

Vagrant up bring up a vm

Actual behavior

vagrant fails bringing up a vm when is trying to update vbguest

Reproduction information

Vagrant version

Vagrant 2.3.7

Host operating system

opensuse tumbleweed VERSION=20240521

Guest operating system

Centos7 (a box of)

Steps to reproduce

So i fixed it by editing the file /usr/share/vagrant/gems/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/hosts/virtualbox.rb:

def guess_local_iso
          Array(platform_path).find do |path|
-             path && File.exists?(path)
+            path && File.exist?(path)
          end
        end

The NoMethodError give me the clue. And the ^^^^^ :-) Is easy to fix but it is annoying anyway.

Vagrantfile

# Copy-paste your Vagrantfile here. Remove any sensitive information such as passwords, authentication tokens, or email addresses.
@aironi
Copy link

aironi commented Aug 22, 2024

Please fix it.

@dangra
Copy link

dangra commented Sep 2, 2024

For anyone looking for a fix, see this fork: https://github.com/dheerapat/vagrant-vbguest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants