Class: BigqueryMigration::CLI
- Inherits:
-
Thor
- Object
- Thor
- BigqueryMigration::CLI
- Defined in:
- lib/bigquery_migration/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
10 11 12 |
# File 'lib/bigquery_migration/cli.rb', line 10 def self.exit_on_failure? true end |
Instance Method Details
#_run(config_path) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/bigquery_migration/cli.rb', line 41 def _run(config_path) opts = .merge( dry_run: ![:exec] ) init_logger reopen_stdout reopen_stderr result = ActionRunner.new(config_path, opts).run open_output do |io| io.puts mask_secret(HashUtil.deep_stringify_keys(result).to_yaml) logger.info { "DRY-RUN has finished. Use --exec option to run." } if opts[:dry_run] end exit(1) unless result[:success] end |