Class: Caco::Debian::AptUpdate
- Inherits:
-
Trailblazer::Operation
- Object
- Trailblazer::Operation
- Caco::Debian::AptUpdate
- Defined in:
- lib/caco/debian/apt_update.rb
Instance Method Summary collapse
- #apt_needs_update(ctx, force: false) ⇒ Object
- #apt_updated(ctx) ⇒ Object
- #command_failed(ctx, command_exit_code:, command_output:) ⇒ Object
Instance Method Details
#apt_needs_update(ctx, force: false) ⇒ Object
16 17 18 19 20 |
# File 'lib/caco/debian/apt_update.rb', line 16 def apt_needs_update(ctx, force: false, **) ctx[:apt_needs_update] = !Caco::Debian.apt_updated ctx[:apt_needs_update] = true if force ctx[:apt_needs_update] end |
#apt_updated(ctx) ⇒ Object
22 23 24 25 |
# File 'lib/caco/debian/apt_update.rb', line 22 def apt_updated(ctx, **) ctx[:apt_updated] = true Caco::Debian.apt_updated = true end |
#command_failed(ctx, command_exit_code:, command_output:) ⇒ Object
27 28 29 30 31 |
# File 'lib/caco/debian/apt_update.rb', line 27 def command_failed(ctx, command_exit_code:, command_output:, **) ctx[:apt_updated] = false Caco::Debian.apt_updated = false true end |