Class: Vivlio::Starter::CLI::SamovarCommands::IndexApplyCommand

Inherits:
Samovar::Command
  • Object
show all
Defined in:
lib/vivlio/starter/cli/samovar/index_command.rb

Overview

index:apply コマンド - レビュー結果を適用

Instance Method Summary collapse

Instance Method Details

#callObject



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/vivlio/starter/cli/samovar/index_command.rb', line 105

def call
  return print_usage if options[:help]

  ENV['VERBOSE'] = '1' if options[:verbose]

  manager = UnifiedIndexManager.new
  manager.apply_markdown_review!
  0
rescue SystemExit => e
  raise e
rescue StandardError => e
  Common.log_error("index:apply 実行中にエラー: #{e.message}")
  Common.log_error(e.backtrace.first(5).join("\n")) if ENV['VERBOSE']
  1
end