Mike McQuaid c82518032e
Fix services types
Some of the typing/`T.must` usage when moving the
Homebrew/homebrew-services code to Homebrew/brew was not quite correct.

Rather than trying to make everything `strict` and import at the same
time: let's mostly loosen the typing to fix a few bugs and allow us to
add more later.
2025-03-14 16:53:07 +00:00

28 lines
639 B
Ruby

# typed: strict
# frozen_string_literal: true
require "services/cli"
module Homebrew
module Services
module Commands
module Stop
TRIGGERS = %w[stop unload terminate term t u].freeze
sig {
params(
targets: T::Array[Services::FormulaWrapper],
verbose: T::Boolean,
no_wait: T::Boolean,
max_wait: T.nilable(Float),
).void
}
def self.run(targets, verbose:, no_wait:, max_wait:)
Services::Cli.check(targets)
Services::Cli.stop(targets, verbose:, no_wait:, max_wait:)
end
end
end
end
end