lib/pdk/cli/build.rb in pdk-1.13.0 vs lib/pdk/cli/build.rb in pdk-1.14.0
- old
+ new
@@ -1,7 +1,5 @@
-require 'pdk/cli/util'
-
module PDK::CLI
@build_cmd = @base_cmd.define_command do
name 'build'
usage _('build [options]')
summary _('Builds a package from the module that can be published to the Puppet Forge.')
@@ -12,9 +10,11 @@
option nil, 'force', _('Skips the prompts and builds the module package.')
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!(
message: _('`pdk build` can only be run from inside a valid module with a metadata.json.'),
log_level: :info,