def generated_metadata_json_readonly
      @logger.operation(:metadata_readonly) do
        # path constants
        freed_metadata_dir = (@cookbook.pos == '.' && freed_dir) || ::File.join(freed_dir, @cookbook.pos)
        freed_metadata_json_path = ::File.join(freed_metadata_dir, JSON_METADATA)

        # in the multi-pass case we will run this scanner only on the second
        # and any subsequent passed, which are outside of containment. the
        # metadata must have already been generated at this point or else it
        # should be considered an internal error.
        return ::File.read(freed_metadata_json_path)
      end
    end
def generated_metadata_json_readonly
      @logger.operation(:metadata_readonly) do
        # path constants
        freed_metadata_dir = (@cookbook.pos == '.' && freed_dir) || ::File.join(freed_dir, @cookbook.pos)
        freed_metadata_json_path = ::File.join(freed_metadata_dir, JSON_METADATA)

        # in the multi-pass case we will run this scanner only on the second
        # and any subsequent passed, which are outside of containment. the
        # metadata must have already been generated at this point or else it
        # should be considered an internal error.
        return ::File.read(freed_metadata_json_path)
      end
    end
Reads the existing generated 'metadata.json' or else fails.

 === Returns
 @return [String] metadata JSON text