Class: VagrantPlugins::GuestClearLinux::BundleRemoveProvisioner

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-guests-clearlinux/provisioner.rb

Instance Method Summary collapse

Instance Method Details

#provisionObject



93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/vagrant-guests-clearlinux/provisioner.rb', line 93

def provision
  @machine.ui.detail("removing the following bundle(s): '#{@config.bundles}'")
  @machine.communicate.sudo("swupd bundle-remove #{@config.bundles}") do |type, data|
    if [:stderr, :stdout].include?(type)
      color = type == :stdout ? :green : :red

      options = {}
      options[:color] = color

      @machine.ui.detail(data.chomp, options)
    end
  end
end