summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-10-21 10:56:39 -0700
committerSerdar Sutay <serdar@opscode.com>2014-10-21 10:56:39 -0700
commit9a1dd31e8d13524602aacb737762875fd2a4a713 (patch)
tree991f02f718a956d8909b1930dd9746f1cd41e0e4
parent20a1817caaf7aae8f8391a0a88df136cf01af832 (diff)
parent48a9d6ac9090bb03d75b54500e14d4877ead8251 (diff)
downloadchef-9a1dd31e8d13524602aacb737762875fd2a4a713.tar.gz
Merge pull request #2239 from justanshulsharma/patch-2
Fix Inconsistent knife from file globbing
-rw-r--r--lib/chef/knife/node_from_file.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/chef/knife/node_from_file.rb b/lib/chef/knife/node_from_file.rb
index d69392a8db..66f2a466fd 100644
--- a/lib/chef/knife/node_from_file.rb
+++ b/lib/chef/knife/node_from_file.rb
@@ -35,16 +35,17 @@ class Chef
end
def run
- updated = loader.load_from('nodes', @name_args[0])
-
- updated.save
-
- output(format_for_display(updated)) if config[:print_after]
-
- ui.info("Updated Node #{updated.name}!")
+ @name_args.each do |arg|
+ updated = loader.load_from('nodes', arg)
+
+ updated.save
+
+ output(format_for_display(updated)) if config[:print_after]
+
+ ui.info("Updated Node #{updated.name}!")
+ end
end
end
end
end
-