Class: Golem::Command::DeleteRepository
- Defined in:
- lib/golem/command/delete_repository.rb
Overview
Command for deleting a repository.
Instance Method Summary collapse
-
#run(name) ⇒ Object
Run the command.
Methods inherited from Base
#command, #initialize, #verbose?
Constructor Details
This class inherits a constructor from Golem::Command::Base
Instance Method Details
#run(name) ⇒ Object
Run the command.
8 9 10 11 12 13 |
# 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 |