From f8eae9984d7f9f0bcc83fa3082592968487c0fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadej=20Jane=C5=BE?= Date: Tue, 13 Aug 2019 13:06:19 +0200 Subject: [PATCH] Use fetch to obtain environment variable value in package_domain (#1035) ENV is a Ruby Hash which doesn't have a get method but the fetch method. --- lib/vagrant-libvirt/action/package_domain.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant-libvirt/action/package_domain.rb b/lib/vagrant-libvirt/action/package_domain.rb index 740c79e..c767fce 100644 --- a/lib/vagrant-libvirt/action/package_domain.rb +++ b/lib/vagrant-libvirt/action/package_domain.rb @@ -38,7 +38,7 @@ module VagrantPlugins `qemu-img rebase -p -b "" #{@tmp_img}` # remove hw association with interface # working for centos with lvs default disks - operations = ENV.get('VAGRANT_LIBVIRT_VIRT_SYSPREP_OPERATIONS', 'defaults,-ssh-userdir') + operations = ENV.fetch('VAGRANT_LIBVIRT_VIRT_SYSPREP_OPERATIONS', 'defaults,-ssh-userdir') `virt-sysprep --no-logfile --operations #{operations} -a #{@tmp_img}` # add any user provided file extra = ''