Skip to content

Commit

Permalink
Chefstyle fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed Mar 6, 2020
1 parent f07a322 commit 6ff43cf
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions lib/chef/knife/winrm_knife_base.rb
Expand Up @@ -25,11 +25,11 @@ class Knife
module WinrmCommandSharedFunctions

FAILED_BASIC_HINT ||= "Hint: Please check winrm configuration 'winrm get winrm/config/service' AllowUnencrypted flag on remote server.".freeze
FAILED_NOT_BASIC_HINT ||= <<-eos.gsub /^\s+/, ""
FAILED_NOT_BASIC_HINT ||= <<-EOS.gsub /^\s+/, ""
Hint: Make sure to prefix domain usernames with the correct domain name.
Hint: Local user names should be prefixed with computer name or IP address.
EXAMPLE: my_domain\\user_namer
eos
EOS

def self.included(includer)
includer.class_eval do
Expand Down Expand Up @@ -69,18 +69,18 @@ def configure_session

def resolve_target_nodes
@list = case config[:manual]
when true
@name_args[0].split(" ")
when false
r = []
q = Chef::Search::Query.new
@action_nodes = q.search(:node, @name_args[0])[0]
@action_nodes.each do |item|
i = extract_nested_value(item, config[:attribute])
r.push(i) unless i.nil?
end
r
end
when true
@name_args[0].split(" ")
when false
r = []
q = Chef::Search::Query.new
@action_nodes = q.search(:node, @name_args[0])[0]
@action_nodes.each do |item|
i = extract_nested_value(item, config[:attribute])
r.push(i) unless i.nil?
end
r
end

if @list.length == 0
if @action_nodes.length == 0
Expand All @@ -91,7 +91,7 @@ def resolve_target_nodes
"Try setting another attribute to open the connection using --attribute.")
end
exit 10
end
end
end

# TODO: Copied from Knife::Core:GenericPresenter. Should be extracted
Expand Down Expand Up @@ -312,9 +312,8 @@ def warn_no_ssl_peer_verification
```
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
WARN
end
end

end
end
end
end
end
Expand Down

0 comments on commit 6ff43cf

Please sign in to comment.