Class: Packwerk::Commands::ValidateCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Packwerk::Commands::ValidateCommand
- Defined in:
- lib/packwerk/commands/validate_command.rb
Instance Method Summary collapse
-
#run ⇒ Object
: -> bool.
Methods inherited from BaseCommand
Constructor Details
This class inherits a constructor from Packwerk::Commands::BaseCommand
Instance Method Details
#run ⇒ Object
: -> bool
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/packwerk/commands/validate_command.rb', line 11 def run validator_result = nil #: Validator::Result? progress_formatter.started_validation do validator_result = validator.check_all(package_set, configuration) end validator_result = validator_result #: as !nil if validator_result.ok? out.puts("Validation successful 🎉") else out.puts("Validation failed ❗\n\n#{validator_result.error_value}") end validator_result.ok? end |