From 7942ecffeef0d5f74ddd0857a5587af93dfcf552 Mon Sep 17 00:00:00 2001 From: Vladimir Jelovac Date: Tue, 6 Feb 2018 22:05:52 +0100 Subject: [PATCH] Changes to run vagrant from project root dir (#163) Introduced a variable which represents current vagrantfile directory path. This way we can run vagrant directly from the Yii2 project root and do not need to store vagrant configurations separately. --- Vagrantfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 163b5c2..5c9e123 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -10,9 +10,11 @@ domains = { app: 'yii2basic.dev' } +vagrantfile_dir_path = File.dirname(__FILE__) + config = { - local: './vagrant/config/vagrant-local.yml', - example: './vagrant/config/vagrant-local.example.yml' + local: vagrantfile_dir_path + '/vagrant/config/vagrant-local.yml', + example: vagrantfile_dir_path + '/vagrant/config/vagrant-local.example.yml' } # copy config from example if local config not exists