Skip to content

Commit

Permalink
(maint) Clean up cli requires
Browse files Browse the repository at this point in the history
  • Loading branch information
rodjek committed Sep 30, 2019
1 parent 2d038fa commit 5563502
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/pdk/cli/build.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'pdk/cli/util'

module PDK::CLI
@build_cmd = @base_cmd.define_command do
name 'build'
Expand All @@ -15,6 +13,7 @@ module PDK::CLI
run do |opts, _args, _cmd|
require 'pdk/module/build'
require 'pdk/module/metadata'
require 'pdk/cli/util'

# Make sure build is being run in a valid module directory with a metadata.json
PDK::CLI::Util.ensure_in_module!(
Expand Down
3 changes: 1 addition & 2 deletions lib/pdk/cli/convert.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'pdk/cli/util'

module PDK::CLI
@convert_cmd = @base_cmd.define_command do
name 'convert'
Expand All @@ -16,6 +14,7 @@ module PDK::CLI

run do |opts, _args, _cmd|
require 'pdk/module/convert'
require 'pdk/cli/util'

PDK::CLI::Util.ensure_in_module!(
check_module_layout: true,
Expand Down
5 changes: 2 additions & 3 deletions lib/pdk/cli/update.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
require 'pdk/cli/util'
require 'pdk/util'

module PDK::CLI
@update_cmd = @base_cmd.define_command do
name 'update'
Expand All @@ -13,6 +10,8 @@ module PDK::CLI
PDK::CLI.template_ref_option(self)

run do |opts, _args, _cmd|
require 'pdk/cli/util'
require 'pdk/util'
require 'pdk/module/update'

PDK::CLI::Util.ensure_in_module!(
Expand Down

0 comments on commit 5563502

Please sign in to comment.