Class: Ecic::ProjectCmd

Inherits:
Command show all
Defined in:
lib/ecic/project_cmd.rb

Instance Method Summary collapse

Methods inherited from Command

dispatch

Instance Method Details

#rootdirObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/ecic/project_cmd.rb', line 8

def rootdir
  begin
    project_root_path = Ecic::Project::root
    if project_root_path.nil?
      shell.error set_color("You must be within an ECIC project before calling this command",Thor::Shell::Color::RED)
      exit(1)
    else
     say project_root_path
    end
  rescue Exception => exc
    shell.error set_color(exc.message,Thor::Shell::Color::RED)
    exit(3)
  end
end