From 23215d4fa2e7feeb3f4250f13acec6823f85083f Mon Sep 17 00:00:00 2001 From: Charlie Sharpsteen Date: Tue, 18 Aug 2026 12:52:23 -0500 Subject: [PATCH] puppet generate: print module directory when types are missing When `puppet generate types` is run, it scans the `modulepath` in an environment and compiles environment-isolated implementations for each module that contains a `puppet/type/` sub-directory. When run with debug logging enabled, the command prints the name of each module skipped due to the types sub-directory not being visible. This commit updates the debug-level message to add the path to the module directory that was examined. Module discovery is done by walking the `modulepath`, which is a prioritized list of locations that modules can be loaded from. Including the directory path in the debug message gives users a signal that can indicate when a module has been shadowed by another directory with the same name, but higher precedence on the `modulepath`. Signed-off-by: Charlie Sharpsteen --- lib/puppet/generate/type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/generate/type.rb b/lib/puppet/generate/type.rb index 53fbc757ad..aa95588cac 100644 --- a/lib/puppet/generate/type.rb +++ b/lib/puppet/generate/type.rb @@ -124,7 +124,7 @@ def self.find_inputs(format = :pcore, environment = Puppet.lookup(:current_envir environment.modules.each do |mod| directory = File.join(Puppet::Util::Autoload.cleanpath(mod.plugin_directory), 'puppet', 'type') unless Puppet::FileSystem.exist?(directory) - Puppet.debug "Skipping '#{mod.name}' module because it contains no custom types." + Puppet.debug "Skipping '#{mod.name}' module because there is no readable puppet/type/ directory under: #{directory}" next end