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.
This commit is contained in:
Tadej Janež
2019-08-13 13:06:19 +02:00
committed by Darragh Bailey
parent c3af181c83
commit f8eae9984d

View File

@@ -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 = ''