diff options
author | Moser, Kevin <Kevin.Moser@nordstrom.com> | 2013-03-13 13:40:55 -0700 |
---|---|---|
committer | Moser, Kevin <Kevin.Moser@nordstrom.com> | 2013-03-13 13:40:55 -0700 |
commit | 52a51724a488cba92804a0c180d2c9d61358a882 (patch) | |
tree | 46dc62eacd26f39b6873533f10b75535be72cc7f | |
parent | 85e5bc5f55363e488d20d43d7cff3e519c52c6d2 (diff) | |
download | mixlib-shellout-52a51724a488cba92804a0c180d2c9d61358a882.tar.gz |
Set domain to . if no domain is passed
-rw-r--r-- | lib/mixlib/shellout/windows.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mixlib/shellout/windows.rb b/lib/mixlib/shellout/windows.rb index a513186..ea809b5 100644 --- a/lib/mixlib/shellout/windows.rb +++ b/lib/mixlib/shellout/windows.rb @@ -38,7 +38,7 @@ module Mixlib # Option validation that is windows specific def validate_options(opts) if opts[:user] - unless opts[:password] && opts[:domain] + unless opts[:password] raise InvalidCommandOption, "You must supply both a username and password when supplying a user in windows" end end @@ -75,7 +75,8 @@ module Mixlib :close_handles => false } create_process_args[:cwd] = cwd if cwd - create_process_args[:domain] = domain if domain + # default to local account database if domain is not specified + create_process_args[:domain] = domain.nil? ? "." : domain create_process_args[:with_logon] = with_logon if with_logon create_process_args[:password] = password if password |