Reputation: 2241
Currently it takes 3 steps to run the script I want in the guest:
vagrant ssh
cd /vagrant
composer test
Is there a way of running composer test
from the host machine inside the guest in a single step?
I could add the 3 steps to a vagrant provisioning script so they get run automatically on vagrant up
. But, I want to be able to run composer test
multiple times from the host during a single vagrant session and ideally without having to ssh into it first.
Upvotes: 0
Views: 300
Reputation: 2282
Like ssh
, vagrant ssh
has a -c
flag to run command directly, so you can do:
vagrant ssh -c "cd /vagrant && composer test"
Upvotes: 1