Skip to content

Commit

Permalink
Merge pull request #544 from chef/dedupe_deps
Browse files Browse the repository at this point in the history
Lazy load deps and avoid double loading
  • Loading branch information
tas50 authored Aug 3, 2018
2 parents 739ddad + 36acbfa commit 2ce6c37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 0 additions & 3 deletions lib/chef/knife/ec2_server_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ class Ec2ServerCreate < Knife
include Knife::BootstrapWindowsBase
deps do
require "tempfile"
require "fog/aws"
require "uri"
require "readline"
require "chef/json_compat"
require "chef/knife/bootstrap"
Chef::Knife::Bootstrap.load_deps
end
Expand Down
10 changes: 6 additions & 4 deletions lib/chef/knife/ec2_server_delete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@

require "chef/knife/ec2_base"

# These two are needed for the '--purge' deletion case
require "chef/node"
require "chef/api_client"

class Chef
class Knife
class Ec2ServerDelete < Knife

include Knife::Ec2Base

deps do
# These two are needed for the '--purge' deletion case
require "chef/node"
require "chef/api_client"
end

banner "knife ec2 server delete SERVER [SERVER] (options)"

attr_reader :server
Expand Down

0 comments on commit 2ce6c37

Please sign in to comment.