Class: KnifeSpork::SporkCheck

Inherits:
Chef::Knife
  • Object
show all
Defined in:
lib/chef/knife/spork-check.rb

Instance Method Summary collapse

Instance Method Details

#runObject



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/chef/knife/spork-check.rb', line 41

def run
  self.class.send(:include, KnifeSpork::Runner)
  self.config = Chef::Config.merge!(config)

  if name_args.empty?
    ui.fatal 'You must specify a cookbook name!'
    show_usage
    exit(1)
  end

  # Temporary fix for #138 to allow Berkshelf functionality
  # to be bypassed until #85 has been completed and Berkshelf 3 support added
  unload_berkshelf_if_specified

  #First load so plugins etc know what to work with
  initial_load
  
  run_plugins(:before_check)

  #Reload cookbook in case a VCS plugin found updates
  initial_load

  check
  run_plugins(:after_check)
end