Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for "Data Bag Items must contain a Hash or Mash!" introduced in 1.3.1 #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module ChefVaultCookbook
# @param [String] bag Name of the data bag to load from.
# @param [String] id Identifier of the data bag item to load.
def chef_vault_item(bag, id)
if ChefVault::Item.vault?(bag, id)
if Chef::DataBag.load(bag).key?("#{id}_keys")
ChefVault::Item.load(bag, id)
elsif node['chef-vault']['databag_fallback']
Chef::DataBagItem.load(bag, id)
Expand Down