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

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

Closed
wants to merge 1 commit into from

Conversation

bowlofeggs
Copy link
Contributor

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.

@purpleidea
Copy link
Owner

@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?

@purpleidea
Copy link
Owner

@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.

@purpleidea
Copy link
Owner

@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.

@purpleidea
Copy link
Owner

@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 purpleidea closed this Jul 2, 2015
@bowlofeggs bowlofeggs deleted the cwd_omv.yaml branch August 14, 2015 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants