# frozen_string_literal: true # Requirements # ======================================================================= # Stdlib # ----------------------------------------------------------------------- # Deps # ----------------------------------------------------------------------- require 'cmds' # Project / Package # ----------------------------------------------------------------------- # Refinements # ======================================================================= using NRSER using NRSER::Types # Definitions # ======================================================================= # Thin wrapper to run `launchctl` commands and capture outputs via {Cmds}. # # Basically just centralizes this stuff all in one place and presents a # friendly API, does some common debug logging, etc. # module Locd::Launchctl # Mappings between any option keyword names we use to the ones `launchctl` # expects. # # @return [Hash] # OPTS_MAP = { force: :F, write: :w, } # Regexp to parse `launchd list` output for {#status} method. # # @return [Regexp] # STATUS_RE = /^(?\S+)\s+(?\S+)\s+(?