#! /usr/bin/env ruby
# frozen_string_literal: true

require 'thor'

require_relative '../lib/trmnlp/cli'

# Force UTC to match trmnl.com server time zone
ENV['TZ'] = 'UTC'

begin
  TRMNLP::CLI.start
rescue TRMNLP::Error => e
  reporter = TRMNLP::Reporter.new
  reporter.info reporter.red("Error: #{e.message}")
  exit 1
rescue Interrupt
  exit 1
end
