summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel DeLeo <dan@opscode.com>2011-04-12 11:47:38 -0700
committerDaniel DeLeo <dan@opscode.com>2011-04-12 11:47:38 -0700
commitf65590f6dfcbb681ce98e853dde3b8886866635a (patch)
tree5c0e9cc4a0b6cadece424cc3fd471728c6003ca5
parent123d9d6444b4c6b2e4fd35d2e2bba6b4eb90f851 (diff)
downloadchef-f65590f6dfcbb681ce98e853dde3b8886866635a.tar.gz
only want to skip the existing db check if check_for_existing is false
...but don't actually skip creating the db
-rw-r--r--chef/lib/chef/couchdb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/chef/lib/chef/couchdb.rb b/chef/lib/chef/couchdb.rb
index 3d0b0083c8..71ee196462 100644
--- a/chef/lib/chef/couchdb.rb
+++ b/chef/lib/chef/couchdb.rb
@@ -71,7 +71,7 @@ class Chef
def create_db(check_for_existing=true)
@database_list = @rest.get_rest("_all_dbs")
- if check_for_existing && !@database_list.any? { |db| db == couchdb_database }
+ if !check_for_existing || !@database_list.any? { |db| db == couchdb_database }
response = @rest.put_rest(couchdb_database, Hash.new)
end
couchdb_database