mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
21 lines
477 B
Ruby
21 lines
477 B
Ruby
![]() |
# typed: strict
|
||
|
# frozen_string_literal: true
|
||
|
|
||
|
module Service
|
||
|
module Commands
|
||
|
module Cleanup
|
||
|
TRIGGERS = %w[cleanup clean cl rm].freeze
|
||
|
|
||
|
sig { void }
|
||
|
def self.run
|
||
|
cleaned = []
|
||
|
|
||
|
cleaned += Service::ServicesCli.kill_orphaned_services
|
||
|
cleaned += Service::ServicesCli.remove_unused_service_files
|
||
|
|
||
|
puts "All #{System.root? ? "root" : "user-space"} services OK, nothing cleaned..." if cleaned.empty?
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|