emyl / vagrant-triggers

Allow the definition of arbitrary scripts that will run on the host before and/or after Vagrant commands.
MIT License
546 stars 35 forks source link

Triggers not running for vagrant rsync #36

Closed dweingart closed 9 years ago

dweingart commented 9 years ago

I can't seem to write a trigger that runs for the rsync command.

This works (displays a message on the console):

config.trigger.before :suspend do
    error "This works"
end

This doesn't do anything (no message on the console):

config.trigger.before :rsync do
    error "This does nothing"
end

It would be very nice to be able to run triggers for the rsync and rsync-auto actions.

emyl commented 9 years ago

Hello,

Unfortunately there's not much I can do. The plugin use action hooks for intercepting commands and running triggers, but such hooks have never been implemented in upstream vagrant for rsync commands.

An enhancement request already exists on vagrant issue tracker (https://github.com/mitchellh/vagrant/issues/4394), once implemented triggers should start fire automagically.

Bests.