summaryrefslogtreecommitdiff
path: root/lib/chef/knife/node_policy_set.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/knife/node_policy_set.rb')
-rw-r--r--lib/chef/knife/node_policy_set.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/knife/node_policy_set.rb b/lib/chef/knife/node_policy_set.rb
index cfbae1ff6f..d34ebd9478 100644
--- a/lib/chef/knife/node_policy_set.rb
+++ b/lib/chef/knife/node_policy_set.rb
@@ -45,7 +45,7 @@ class Chef
# Set policy name and group to node
def set_policy(node)
- policy_group, policy_name = @name_args[1..-1]
+ policy_group, policy_name = @name_args[1..]
node.policy_name = policy_name
node.policy_group = policy_group
end
@@ -70,7 +70,7 @@ class Chef
# True if one of policy_name or policy_group was given, but not both
def incomplete_policyfile_options?
- policy_group, policy_name = @name_args[1..-1]
+ policy_group, policy_name = @name_args[1..]
(policy_group.nil? || policy_name.nil? || @name_args[1..-1].size > 2)
end