Module: VagrantPlugins::ProviderLibvirt::Util::Ui

Included in:
Action::HandleBoxImage, Action::PackageDomain
Defined in:
lib/vagrant-libvirt/util/ui.rb

Instance Method Summary collapse

Instance Method Details

#rewriting(ui) ⇒ Object

Since v2.2.8 Vagrant support –no-tty option, which silences progress bars and other interactive elements for cleaner logs in scripts, but requires a slight change in UI object handling. This helper allows the vagrant-libvirt plugin to stay compatible with the older Vagrant versions. See: github.com/hashicorp/vagrant/pull/11465/


12
13
14
15
16
17
18
# File 'lib/vagrant-libvirt/util/ui.rb', line 12

def rewriting(ui)
  if ui.respond_to?(:rewriting)
    ui.rewriting {|rw| yield rw}
  else
    yield ui
  end
end