Sha256: 332581bc2c1d99ec209355cdd05ea9c8a500d5ddf5d30bcf4c9a775cbd8ae24e
Contents?: true
Size: 1.07 KB
Versions: 28
Compression:
Stored size: 1.07 KB
Contents
# frozen_string_literal: true require "clamp" #require "git" module Makit module Cli # Define the 'pull' subcommand class PullCommand < Clamp::Command parameter "GIT_REPOSITORY", "The git repository url", attribute_name: :git_repository, required: true option "--ignore-errors", :flag, "Ignore errors and present warnings instead of exiting" def execute puts "pulling latest changes for repository: #{git_repository}" begin Makit::pull(git_repository) rescue Git::GitExecuteError => e $stderr.puts "failed to pull repository: #{git_repository}" puts "Please check the URL and your network connection." exit 1 rescue => e $stderr.puts "failed to pull repository: #{git_repository}" puts e.message exit 1 end clone_dir = Directories::get_clone_directory(git_repository) puts "size of clone directory: #{clone_dir} is #{Humanize::get_humanized_size(Directory::get_size(clone_dir))}" end end end end
Version data entries
28 entries across 28 versions & 1 rubygems