Sha256: f0468b571246481080f01f70a36d9ef8bbf3aa69ac20a565c445357b16f6c77d
Contents?: true
Size: 659 Bytes
Versions: 7
Compression:
Stored size: 659 Bytes
Contents
module RocketApi module Commands module Dirs # @param [Array] dirs def create_repo(dirs) dirs.each do |dir| create_dir(dir) rescue StandardError => e puts "#{CREATE_FAILED} #{e.message}" end end # @param [String] dir_name # ... # @raise [StandardError] def create_dir(dir_name) raise "#{RocketApi::FOLDER_EXIST} #{dir_name}" if is_exist?(dir_name) system 'mkdir', '-p', "#{dir_name}" puts "#{RocketApi::CREATE_SUCCESS} #{dir_name}" rescue StandardError => e raise e, "#{dir_name} err: #{e.message}" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems