28 lines
515 B
Ruby
Raw Normal View History

require "cask/artifact/moved"
2016-08-18 22:11:42 +03:00
2018-09-06 08:29:14 +02:00
module Cask
2016-09-24 13:52:43 +02:00
module Artifact
class Qlplugin < Moved
def self.english_name
2016-09-24 13:52:43 +02:00
"QuickLook Plugin"
end
2016-08-18 22:11:42 +03:00
def install_phase(**options)
super(**options)
reload_quicklook(**options)
2016-09-24 13:52:43 +02:00
end
2016-08-18 22:11:42 +03:00
def uninstall_phase(**options)
super(**options)
reload_quicklook(**options)
2016-09-24 13:52:43 +02:00
end
2016-08-18 22:11:42 +03:00
private
def reload_quicklook(command: nil, **_)
command.run!("/usr/bin/qlmanage", args: ["-r"])
2016-09-24 13:52:43 +02:00
end
end
2016-08-18 22:11:42 +03:00
end
end