From 0b85e04399e56e6a9fe2d8271592376b960f9c51 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Sat, 30 May 2015 11:39:18 -0700 Subject: [PATCH] Minor style fixes for salt config_dir --- plugins/provisioners/salt/config.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/provisioners/salt/config.rb b/plugins/provisioners/salt/config.rb index f31b65786..545ea4aa5 100644 --- a/plugins/provisioners/salt/config.rb +++ b/plugins/provisioners/salt/config.rb @@ -94,10 +94,7 @@ module VagrantPlugins end def default_config_dir(machine) - guest_type = machine.config.vm.guest - if guest_type == nil - guest_type = :linux - end + guest_type = machine.config.vm.guest || :linux # FIXME: there should be a way to do that a bit smarter if guest_type == :windows @@ -105,7 +102,6 @@ module VagrantPlugins else return "/etc/salt" end - end def validate(machine) @@ -147,7 +143,7 @@ module VagrantPlugins errors << I18n.t("vagrant.provisioners.salt.must_accept_keys") end - if @config_dir == nil + if @config_dir.nil? @config_dir = default_config_dir(machine) end