-
Notifications
You must be signed in to change notification settings - Fork 15
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
Passing Nil To configuration_file #18
Comments
Thanks @AshleyPoole. Looks like it might be a bug actually, obviously I've anticipated this scenario but it appears as if its not properly implemented (include Tests). Happy for you to submit a patch with tests and i'll update the plugin? |
@mefellows can you provide some basics / README for developers? I've got all the gems installed needed and wanted to run the tests before making the bugfix but I'm getting "require': cannot load such file -- vagrant (LoadError)". I already have Vagrant installed on my device (OS X) and running gem for Vagrant says the package is no longer being updated and to use the native installer (already installed). Anyway if you can provide some basic notes, I'm more than happy to (and want to) make the fix. |
Hi @AshleyPoole, I've updated the As a TL;DR - you need to execute tests via Bundler i.e. Thanks for chipping in! |
@mefellows Thanks the README.md has helped a lot and I've got tests around the area though I'm unsure yet how to approach this; It's unclear from the README.md what parameters you want set for each of the two modes - precompiled MOF's VS compile MOF's. I believe if you could update the README.MD to have a example of two usages this will help make things a little clearer to what is needed or not needed for each of the two modes of operation. This then makes the intent much clearer to developers helping out. |
No worries at all. I would suggest that if I'll update the README accordingly. |
Also, looking at https://github.com/mefellows/vagrant-dsc/blob/master/lib/vagrant-dsc/templates/runner.ps1.erb#L18-L20 it feels like they should be moved to under line 23 and the default setting of |
Just ran into this myself. I wanted to test a MOF and see if it would apply cleanly but even with all the configuration file options commented it throws the warning. I tried moving the check for both the @config and @mof being defined to BEFORE the @config gets assigned the default.ps1 value (making it never nil before the nil check), but I think there may be a cached copy somewhere (I was hacking directly in ~/.vagrant.d/gems/gems/vagrant-dsc/lib), or as @mefellows mentioned perhaps there is somewhere else that it needs changed as well. I might see if I can setup a dev environment to run some tests around this, currently I am just trying to get DSCLocalConfigurationManager settings in place, and since doesn't support taking a config file, I am attempting to fake it by creating an empty psd1, the way the DSCLocalConfiguration works isn't quite the same as a standard module though so I'm not sure how well it will work out. |
Thanks @dragon788, happy to take PRs on this. |
Hi,
I'm trying to set the configuration_file variable in the Vagrant file to nil but I cannot seem to get it to work. Could you provide an example as I'm trying to use precompiled mof files but cannot.
One possibility is it might be a bug? Within config.rb, line 97 sets the default value to "Default.ps1" if a value isn't given, yet on line 117 the variaibile is tested to see if it's null as to allow the the mof path instead. I believe this is why the message "cannot provide configuration_file and mof_path at the same time. Please provide only one of the two" is being printed out.
https://github.com/mefellows/vagrant-dsc/blob/master/lib/vagrant-dsc/config.rb#L97
The text was updated successfully, but these errors were encountered: