Class: Ocak::Commands::Clean
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- Ocak::Commands::Clean
- Defined in:
- lib/ocak/commands/clean.rb
Instance Method Summary collapse
Instance Method Details
#call(**options) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ocak/commands/clean.rb', line 16 def call(**) config = Config.load do_worktrees = ![:logs] || [:all] do_logs = [:logs] || [:all] clean_worktrees(config) if do_worktrees clean_logs(config, keep_days: [:keep]) if do_logs rescue Config::ConfigNotFound => e warn "Error: #{e.}" exit 1 end |