Check the CWD for an omv.yaml file. #89

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

bowlofeggs commented May 21, 2015

In working to make it possible to use OMV without depending on subdirectories, it is necessary to have it look in the current working directory to find an omv.yaml file.

This means that you can put your project folder elsewhere on the filesystem than under your OMV checkout if you also set the environment variable VAGRANT_CWD to point to your checkout of OMV's vagrant folder containing the OMV Vagrantfile.

Owner

purpleidea commented May 21, 2015

@rbarlow Interesting idea, however I think you want to check and/or modify the projectdir variable instead... I'm not sure that would be incorrect even with this CWD var... Can you verify?

Owner

purpleidea commented May 21, 2015

@rbarlow oh wait, i'm dumb. I just realized you want to have oh-my-vagrant somewhere, but have the omv.yaml in your CWD. Got it. LMK think about this a moment.

Owner

purpleidea commented May 21, 2015

@rbarlow instead of this patch, which might not work in all cases, why don't you try adding your snippet in an elseif block to this if statement: https://github.com/purpleidea/oh-my-vagrant/blob/master/vagrant/Vagrantfile#L146

IOW:

if no existing omv.yaml file exists, and
VAGRANT_CWD is set, and
the omv.yaml file exists in my current dir, then
use it.

The second check would be useful so that we know they are using VAGRANT_CWD as opposed to just omv randomly finding an omv.yaml file I guess.

Owner

purpleidea commented Jul 2, 2015

@rbarlow So, this idea turned out (I think) to be pretty good, but the implementation ended up being a bit more complicated. I am tracking this now in: #96 I will close this PR for now. I hacked on it, and put up a feature branch in: https://github.com/purpleidea/oh-my-vagrant/tree/feat/installable

purpleidea closed this Jul 2, 2015

bowlofeggs deleted the bowlofeggs:cwd_omv.yaml branch Aug 14, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment