Class: Chef::Knife::CookbookMetadataFromFile

Inherits:
Knife
  • Object
show all
Defined in:
lib/chef/knife/cookbook_metadata_from_file.rb

Instance Method Summary collapse

Instance Method Details

#runObject



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/chef/knife/cookbook_metadata_from_file.rb', line 33

def run
  if @name_args.length < 1
    show_usage
    ui.fatal("You must specify the FILE.")
    exit(1)
  end

  file = @name_args[0]
  cookbook = File.basename(File.dirname(file))

   = Chef::Knife::.new
  .(cookbook, file)
end