Discovered. You're using: .to_sym function.
In this case you're code above should transform to: if provider == :aws puts 'If you want to use the AWS provider, you must provide these variables: ' <code snip> end On Monday, 23 November 2015 13:08:34 UTC+2, Dragos Cirjan wrote: > > I think you can always use smth like > > VAGRANT_DEFAULT_PROVIDER=lxc vagrant destroy -f > > to destroy or do smth else, however I can't pretend I understand why, when > using > > vagrant up --provider=virtualbox > > it works, while when using > > VAGRANT_DEFAULT_PROVIDER=virtualbox vagrant up > > it doesn't work. I used your code above. > > > On Saturday, 23 August 2014 06:52:56 UTC+3, Hamilton Turner wrote: >> >> Also, that code only works for the "vagrant up" command (e.g. when >> provider is specified). If you need to know the provider for something >> like "vagrant destroy" >> I'm not sure how you could do that, unless you can have a variable that >> persists between >> vagrantfile loads >> > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/0a9e3278-1b3d-4f92-bdf4-db6a641fb769%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
