From f14f7501250038020d2d0d08750677052ad6bbae Mon Sep 17 00:00:00 2001 From: Stephen Reay Date: Tue, 18 Jul 2023 22:54:22 +0700 Subject: [PATCH] Don't try to call methdods on Nil. Closes Parallels/vagrant-parallels#455 --- lib/vagrant-parallels/util/common.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant-parallels/util/common.rb b/lib/vagrant-parallels/util/common.rb index c66092e..5f3e8a0 100644 --- a/lib/vagrant-parallels/util/common.rb +++ b/lib/vagrant-parallels/util/common.rb @@ -6,7 +6,7 @@ module Common # Determines whether the VM's box contains a macOS guest for an Apple Silicon host. # In this case the image file ends with '.macvm' instead of '.pvm' def self.is_macvm(machine) - return !!Dir.glob(machine.box.directory.join('*.macvm')).first + return !machine.box.nil? && !!Dir.glob(machine.box.directory.join('*.macvm')).first end end