bolt-modules/file/lib/puppet/functions/file/read.rb in bolt-3.17.0 vs bolt-modules/file/lib/puppet/functions/file/read.rb in bolt-3.18.0
- old
+ new
@@ -18,14 +18,11 @@
def read(scope, filename)
# Send Analytics Report
executor = Puppet.lookup(:bolt_executor) {}
executor&.report_function_call(self.class.name)
- future = executor&.future || Puppet.lookup(:future) { {} }
- fallback = future.fetch('file_paths', false)
-
# Find the file path if it exists, otherwise return nil
- found = Bolt::Util.find_file_from_scope(filename, scope, fallback)
+ found = Bolt::Util.find_file_from_scope(filename, scope)
unless found && Puppet::FileSystem.exist?(found)
raise Puppet::ParseErrorWithIssue.from_issue_and_stack(
Puppet::Pops::Issues::NO_SUCH_FILE_OR_DIRECTORY, file: filename
)
end