Method: Ufo::Command.check_project!
- Defined in:
- lib/ufo/command.rb
.check_project!(args) ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/ufo/command.rb', line 97 def check_project!(args) command_name = args.first return if subcommand? return if command_name.nil? return if help_flags.include?(args.last) # IE: -h help return if %w[-h -v --version central init version].include?(command_name) return if File.exist?("#{Ufo.root}/.ufo") logger.error "ERROR: It doesnt look like this is a ufo project. Are you sure you are in a ufo project?".color(:red) ENV['UFO_TEST'] ? raise : exit(1) end |