lib/pdk/cli/new/class.rb in pdk-1.15.0 vs lib/pdk/cli/new/class.rb in pdk-1.16.0

- old
+ new

@@ -11,11 +11,10 @@ message: _('Classes can only be created from inside a valid module directory.'), log_level: :info, ) class_name = args[0] - module_dir = Dir.pwd if class_name.nil? || class_name.empty? puts command.help exit 1 end @@ -24,9 +23,9 @@ raise PDK::CLI::ExitWithError, _("'%{name}' is not a valid class name") % { name: class_name } end PDK::CLI::Util.analytics_screen_view('new_class', opts) - PDK::Generate::PuppetClass.new(module_dir, class_name, opts).run + PDK::Generate::PuppetClass.new(PDK::Util.module_root, class_name, opts).run end end end