summaryrefslogtreecommitdiff
path: root/lib/chef/knife/data_bag_create.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/knife/data_bag_create.rb')
-rw-r--r--lib/chef/knife/data_bag_create.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/knife/data_bag_create.rb b/lib/chef/knife/data_bag_create.rb
index 92ea981a2b..c520bba570 100644
--- a/lib/chef/knife/data_bag_create.rb
+++ b/lib/chef/knife/data_bag_create.rb
@@ -55,6 +55,7 @@ class Chef
ui.info("Data bag #{@data_bag_name} already exists")
rescue Net::HTTPClientException => e
raise unless e.to_s =~ /^404/
+
# if it doesn't exists, try to create it
rest.post("data", { "name" => @data_bag_name })
ui.info("Created data_bag[#{@data_bag_name}]")