Module: Strata::CLI::Guard
- Included in:
- Main, SubCommands::Audit, SubCommands::Create, SubCommands::Datasource, SubCommands::Deploy, SubCommands::Project, SubCommands::Table
- Defined in:
- lib/strata/cli/guard.rb
Constant Summary collapse
- ALLOWED_COMMANDS =
%w[ init help adapters version deploy ].freeze
Instance Method Summary collapse
Instance Method Details
#invoke_command(command, *args) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/strata/cli/guard.rb', line 15 def invoke_command(command, *args) Utils.exit_error_if_not_strata! unless ALLOWED_COMMANDS.include?(command.name) super rescue Strata::CommandError => e shell.say_error "ERROR: #{e.}", :red exit 1 end |