28 lines
548 B
Ruby
Raw Normal View History

# typed: true
2020-04-05 15:30:37 +02:00
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
2020-08-19 10:23:41 +02:00
# Artifact corresponding to the `mdimporter` stanza.
2020-04-05 15:30:37 +02:00
class Mdimporter < Moved
2020-10-20 12:03:48 +02:00
sig { returns(String) }
2020-04-05 15:30:37 +02:00
def self.english_name
"Spotlight metadata importer"
end
def install_phase(**options)
2024-05-23 17:08:41 +01:00
super
2020-04-05 15:30:37 +02:00
reload_spotlight(**options)
end
private
def reload_spotlight(command: nil, **_)
command.run!("/usr/bin/mdimport", args: ["-r", target])
end
end
end
end