2025-02-26 13:26:37 +01:00
|
|
|
# typed: strict
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2025-03-14 04:35:30 +00:00
|
|
|
require "services/cli"
|
2025-02-26 13:26:37 +01:00
|
|
|
|
2025-03-14 04:35:30 +00:00
|
|
|
module Homebrew
|
|
|
|
module Services
|
|
|
|
module Commands
|
|
|
|
module Stop
|
|
|
|
TRIGGERS = %w[stop unload terminate term t u].freeze
|
|
|
|
|
|
|
|
sig {
|
|
|
|
params(
|
|
|
|
targets: T::Array[Services::FormulaWrapper],
|
2025-03-14 16:53:07 +00:00
|
|
|
verbose: T::Boolean,
|
|
|
|
no_wait: T::Boolean,
|
2025-03-14 04:35:30 +00:00
|
|
|
max_wait: T.nilable(Float),
|
2025-03-25 03:43:54 +00:00
|
|
|
keep: T::Boolean,
|
2025-03-14 04:35:30 +00:00
|
|
|
).void
|
|
|
|
}
|
2025-03-25 03:43:54 +00:00
|
|
|
def self.run(targets, verbose:, no_wait:, max_wait:, keep:)
|
2025-07-14 14:48:08 +01:00
|
|
|
Services::Cli.check!(targets)
|
2025-03-25 03:43:54 +00:00
|
|
|
Services::Cli.stop(targets, verbose:, no_wait:, max_wait:, keep:)
|
2025-03-14 04:35:30 +00:00
|
|
|
end
|
2025-02-26 13:26:37 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|