2024-05-23 17:15:43 +01:00

28 lines
548 B
Ruby

# typed: true
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `mdimporter` stanza.
class Mdimporter < Moved
sig { returns(String) }
def self.english_name
"Spotlight metadata importer"
end
def install_phase(**options)
super
reload_spotlight(**options)
end
private
def reload_spotlight(command: nil, **_)
command.run!("/usr/bin/mdimport", args: ["-r", target])
end
end
end
end