2018-08-25 21:25:39 +10:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
APP_PATH = File.expand_path('../config/application', __dir__)
|
2020-05-16 02:41:27 +10:00
|
|
|
|
2018-09-07 13:42:54 +10:00
|
|
|
require_relative '../config/boot'
|
2023-05-24 00:08:26 +10:00
|
|
|
require_relative '../lib/mastodon/cli/main'
|
2020-05-16 02:41:27 +10:00
|
|
|
|
|
|
|
begin
|
2023-03-13 09:47:55 +11:00
|
|
|
Chewy.strategy(:mastodon) do
|
2024-01-26 19:53:44 +11:00
|
|
|
Mastodon::CLI::Main.start(ARGV, debug: true) # Enables the script to rescue `Thor::Error`
|
2023-03-13 09:47:55 +11:00
|
|
|
end
|
2024-01-26 19:53:44 +11:00
|
|
|
rescue Thor::Error => e
|
|
|
|
Thor::Shell::Color
|
|
|
|
.new
|
|
|
|
.say_error(e.message, :red)
|
|
|
|
exit(1)
|
2020-05-16 02:41:27 +10:00
|
|
|
rescue Interrupt
|
|
|
|
exit(130)
|
|
|
|
end
|