diff --git a/Casks/virtualbox-extension-pack-beta.rb b/Casks/virtualbox-extension-pack-beta.rb index e8013a88e..36e6bbebf 100644 --- a/Casks/virtualbox-extension-pack-beta.rb +++ b/Casks/virtualbox-extension-pack-beta.rb @@ -12,10 +12,20 @@ cask 'virtualbox-extension-pack-beta' do stage_only true postflight do - system 'sudo', 'VBoxManage', 'extpack', 'install', '--replace', "#{staged_path}/Oracle_VM_VirtualBox_Extension_Pack-#{version.before_comma}-#{version.after_comma}.vbox-extpack" + system_command '/usr/local/bin/VBoxManage', + args: [ + 'extpack', 'install', + '--replace', "#{staged_path}/Oracle_VM_VirtualBox_Extension_Pack-#{version.before_comma}-#{version.after_comma}.vbox-extpack" + ], + sudo: true end uninstall_postflight do - system 'sudo', 'VBoxManage', 'extpack', 'uninstall', 'Oracle VM VirtualBox Extension Pack' + system_command '/usr/local/bin/VBoxManage', + args: [ + 'extpack', 'uninstall', + 'Oracle VM VirtualBox Extension Pack' + ], + sudo: true end end