class Golem::Command::DeleteRepository

Command for deleting a repository.

Constants

USAGE

@private

Public Instance Methods

run(name) click to toggle source

Run the command. @param [String] name repository name.

# File lib/golem/command/delete_repository.rb, line 8
def run(name)
    repo_path = Golem::Config.repository_path(name)
    abort 'Repository not found!' unless File.directory?(repo_path)
    system("rm -rf #{repo_path}")
    print "Removed repository #{repo_path}\n" if verbose?
end