Method: ForemanMaintain::Cli::UpgradeCommand#try_upgrade
- Defined in:
- lib/foreman_maintain/cli/upgrade_command.rb
#try_upgrade ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/foreman_maintain/cli/upgrade_command.rb', line 21 def try_upgrade if upgrade_runner.available? yield else instance = ForemanMaintain.detector.feature(:instance) msg = <<~BANNER There are no upgrades available. The current version of #{instance.product_name} is #{instance.current_major_version}. Consider using the update command. BANNER puts msg ForemanMaintain::UpgradeRunner::WARNING_EXIT_CODE end end |