lib/vagrant-norequiretty/plugin.rb in vagrant-norequiretty-0.0.1 vs lib/vagrant-norequiretty/plugin.rb in vagrant-norequiretty-0.0.2
- old
+ new
@@ -14,12 +14,35 @@
require_relative 'action'
action = VagrantNoRequireTTY::Action
# For RSync.
hook.after(Vagrant::Action::Builtin::SyncedFolders, action)
- # For everything else.
- # For great justice.
end
+
+ # For everything else.
+ action_hook('Disable requiretty on shutdown', :machine_action_halt) do |hook|
+ require_relative 'action'
+ action = VagrantNoRequireTTY::Action
+
+ hook.prepend(action)
+ end
+
+ action_hook('Disable requiretty on reload', :machine_action_reload) do |hook|
+ require_relative 'action'
+ action = VagrantNoRequireTTY::Action
+
+ hook.prepend(action)
+ end
+
+ action_hook('Disable requiretty on destroy', :machine_action_destroy) do |hook|
+ require_relative 'action'
+ action = VagrantNoRequireTTY::Action
+
+ hook.prepend(action)
+ end
+
+ # For great justice.
+
[:linux].each do |os|
guest_capability(os, :norequiretty) do
require_relative 'cap'
VagrantNoRequireTTY::Cap