134
135
136
137
138
139
140
141
142
143
144
|
# File 'lib/puppet-languageserver-sidecar/puppet_modulepath_monkey_patches.rb', line 134
def setup_search_paths(request)
result = original_setup_search_paths(request)
return result unless PuppetLanguageServerSidecar::Workspace.has_module_metadata?
additional_dirs = %w[lib plugins].map { |path| File.join(PuppetLanguageServerSidecar::Workspace.root_path, path, 'facter') }
.select { |path| FileTest.directory?(path) }
return result if additional_dirs.empty?
Facter.search(*additional_dirs)
end
|