Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running commands on vagrant up #778

Closed
jonathanbardo opened this issue Nov 2, 2015 · 8 comments
Closed

Running commands on vagrant up #778

jonathanbardo opened this issue Nov 2, 2015 · 8 comments
Assignees
Milestone

Comments

@jonathanbardo
Copy link
Contributor

Hey everyone!

I am trying to figure out the best method to run certain commands on vagrant up.

I always find myself running the following commands and I tried to automate it without any success.

xdebug_on
export PHP_IDE_CONFIG="serverName=src.wordpress-develop.dev"

I tried look at the provisionning script and couldn't find anything that would help me achieve this.

@cfoellmann
Copy link
Member

maybe we can add an if clause to the trigger here https://github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/Vagrantfile#L287-L306 for a custom file?

@jonathanbardo
Copy link
Contributor Author

That was something I was going to propose but I wanted to make sure there wasn't any other way.

@cfoellmann
Copy link
Member

maybe there is a "native" vagrant command you can add to the Vagrantfile. But I am no Vagrant expert

@michaelck
Copy link

@jonathanbardo You may want to check out issue #332. It looks like some folks had success with similar issues by using a Customfile or provision-post.sh

@jonathanbardo
Copy link
Contributor Author

Thanks for pointing that out! My problem with Customfile is that it is run before the provisionning and provision-post.sh is runned not everytime but only when we provision. I think the triggers should do the job.

@jonathanbardo
Copy link
Contributor Author

I've implemented a solution that works perfectly for my use case.
A simple vagrant_up_custom file containing xdebug_on in config/homebin.
Any feedback more than welcome!

@jeremyfelt jeremyfelt added this to the 1.3.0 milestone Feb 3, 2016
@jeremyfelt jeremyfelt self-assigned this Feb 3, 2016
@jeremyfelt
Copy link
Member

Added in #782

@lock
Copy link

lock bot commented Feb 23, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants