tootctl 428 B

123456789101112131415161718
  1. #!/usr/bin/env ruby
  2. APP_PATH = File.expand_path('../config/application', __dir__)
  3. require_relative '../config/boot'
  4. require_relative '../lib/mastodon/cli/main'
  5. begin
  6. Chewy.strategy(:mastodon) do
  7. Mastodon::CLI::Main.start(ARGV, debug: true) # Enables the script to rescue `Thor::Error`
  8. end
  9. rescue Thor::Error => e
  10. Thor::Shell::Color
  11. .new
  12. .say_error(e.message, :red)
  13. exit(1)
  14. rescue Interrupt
  15. exit(130)
  16. end