Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Coremunity
-
Platform Core KANBAN
-
Needs Assessment
-
Bug Fix
-
Puppet server and agent no longer change their current working directories when listing modules in an environment directory.
-
Needs Assessment
Description
When listing modules by path, puppet changes the current working directory unnecessarily. This was first reported in PUP-9997, but broken out here into a separate issue:
def modules_by_path |
modules_by_path = {}
|
modulepath.each do |path| |
if Puppet::FileSystem.exist?(path) |
Dir.chdir(path) do |
module_names = Dir.entries(path).select do |name| |
Puppet::Module.is_module_directory?(name, path) |
end |
modules_by_path[path] = module_names.sort.map do |name| |
Puppet::Module.new(name, File.join(path, name), self) |
end |
end |
else |
modules_by_path[path] = []
|
end |
end |
modules_by_path
|
end |
Attachments
Issue Links
- relates to
-
PUP-9997 Puppet must not call Dir.chdir() except in a child process
-
- Accepted
-