Fixed bug preventing cookbook upload if it doesn't have name in meta
This commit is contained in:
parent
9e1b1d6f9f
commit
8d8c484be6
@ -20,7 +20,7 @@ def create_cookbook(metafile)
|
||||
md = Chef::Cookbook::Metadata.new
|
||||
md.from_file(metafile)
|
||||
|
||||
cook_name = md.name.empty? ? File.basename(src) : md.name
|
||||
cook_name = md.name.empty? ? File.dirname(metafile) : md.name
|
||||
|
||||
recipes_dir = File.join(File.dirname(metafile), "recipes")
|
||||
Dir.chdir(recipes_dir)
|
||||
|
Loading…
Reference in New Issue
Block a user