lib/pdk/validate/yaml/syntax.rb in pdk-1.14.1 vs lib/pdk/validate/yaml/syntax.rb in pdk-1.15.0

- old
+ new

@@ -63,13 +63,13 @@ create_spinner(targets, options) PDK.logger.debug(_('Validating yaml content of %{parsed_targets}') % { parsed_targets: targets.to_s }) targets.each do |target| - next unless File.file?(target) + next unless PDK::Util::Filesystem.file?(target) - unless File.readable?(target) + unless PDK::Util::Filesystem.readable?(target) report.add_event( file: target, source: name, state: :failure, severity: 'error', @@ -78,10 +78,10 @@ return_val = 1 next end begin - ::YAML.safe_load(File.read(target), YAML_WHITELISTED_CLASSES, [], true) + ::YAML.safe_load(PDK::Util::Filesystem.read_file(target), YAML_WHITELISTED_CLASSES, [], true) report.add_event( file: target, source: name, state: :passed,