Class: Space::Architect::CLI::Architect::Worktree::Remove

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/space_architect/cli/architect.rb

Instance Method Summary collapse

Methods inherited from BaseCommand

commit_message_options, phase

Instance Method Details

#call(iteration:, lane:, **opts) ⇒ Object



629
630
631
632
633
634
635
636
637
638
639
# File 'lib/space_architect/cli/architect.rb', line 629

def call(iteration:, lane:, **opts)
  setup_terminal(**opts.slice(:color, :colors))
  handle_errors do
    render(store.find) do |sp|
      project = ArchitectProject.new(space: sp)
      project.worktree_remove(iteration, lane)
      terminal.say "Removed worktree for #{iteration}/#{lane}"
      CLI.record_outcome(Outcome.new(exit_code: 0))
    end
  end
end