Class: Space::Architect::CLI::Architect::Sessions::Agent::Uninstall
Instance Method Summary
collapse
Methods included from Helpers
#format_failure, #plist_path
Methods inherited from BaseCommand
commit_message_options, phase
Instance Method Details
#call(**opts) ⇒ Object
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
|
# File 'lib/space_architect/cli/architect.rb', line 1259
def call(**opts)
setup_terminal(**opts.slice(:color, :colors))
handle_errors do
pp = plist_path
result = Space::Src::Launchd::Agent.new(label: SessionSync::LABEL).uninstall
terminal.say "bootout reported: #{format_failure(result.failure)}" if result.failure?
if File.exist?(pp)
File.delete(pp)
terminal.say "Removed plist: #{terminal.path(pp)}"
else
terminal.say "Plist not present: #{terminal.path(pp)}"
end
CLI.record_outcome(Outcome.new(exit_code: 0))
end
end
|