Class: Freighthop::CLI::Checks

Inherits:
Object
  • Object
show all
Defined in:
lib/freighthop/cli/checks.rb

Class Method Summary collapse

Class Method Details

.ensure_config_exists!Object



2
3
4
5
6
7
8
9
10
11
# File 'lib/freighthop/cli/checks.rb', line 2

def self.ensure_config_exists!
  unless Freighthop::Config.exist?
    puts <<-NO_CONFIG
ERROR: No freighthop config file (.freighthop.json) found in current path.
     You can generate a template config with `fh init`, or see `fh help`
     for more information.
    NO_CONFIG
    exit 1
  end
end