mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-17 06:16:47 -06:00
The indentation in CONTRIBUTING.md implies that :script accepts a hash. But that is not the case. Instead :script accesses the entire hash defined by uninstall. Unrelated install keys such as :quit leak through to @command.run! when attempting to exec :script. Result: contrary to docs, :script cannot be combined with other uninstall keys. This PR makes uninstall :script accept a hash. When :args or :input are not needed, :script can still accept a plain string, so many Casks require no alteration. In addition - adds key :executable, required when using hash argument to :script - keys to :script are validated and sanitized before being passed to @command.run! - adds :quit to with-installable.rb test to protect against regression on leaky keys
8 lines
352 B
Ruby
8 lines
352 B
Ruby
class Virtualbox < Cask
|
|
url 'http://download.virtualbox.org/virtualbox/4.3.6/VirtualBox-4.3.6-91406-OSX.dmg'
|
|
homepage 'http://www.virtualbox.org'
|
|
version '4.3.6-91406'
|
|
sha1 'b268e52552449304ba8021687645a6f9d7d18920'
|
|
install 'VirtualBox.pkg'
|
|
uninstall :script => { :executable => 'VirtualBox_Uninstall.tool', :args => %w[--unattended] }
|
|
end
|