17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/rdm/cli/init.rb', line 17
def run
generated_files_list = Rdm::Gen::Init.generate(
current_path: @current_path,
test: @test,
console: @console
)
generated_files_list.compact.each { |file| @stdout.puts "Generated: #{file}" }
rescue Errno::ENOENT => e
@stdout.puts "Error occurred. Possible reasons:\n #{@current_path} not found. Please run on empty directory \n#{e.inspect}"
rescue Rdm::Errors::ProjectAlreadyInitialized
@stdout.puts 'Error. Project was already initialized'
rescue Rdm::Errors::InvalidParams => e
@stdout.puts e.message
rescue Rdm::Errors::InvalidProjectDir => e
@stdout.puts "#{e.message} doesn't exist. Initialize new rdm project with existing directory"
end
|