lib/puppet/resource/catalog.rb
# Store the classes in the classfile.
Store the classes in the classfile.
Store the classes in the classfile .
def write_class_file
    classfile = Puppet.settings.setting(:classfile)
    Puppet::FileSystem.open(classfile.value, classfile.mode.to_i(8), "w:UTF-8") do |f|
      f.puts classes.join("\n")
    end
  rescue => detail
    Puppet.err _("Could not create class file %{file}: %{detail}") % { file: Puppet[:classfile], detail: detail }
  end
def write_class_file classfile = Puppet . settings . setting ( :classfile ) Puppet :: FileSystem . open ( classfile . value , classfile . mode . to_i ( 8 ) , "w:UTF-8" ) do | f | f . puts classes . join ( "\n" ) end rescue => detail Puppet . err _ ( "Could not create class file %{file}: %{detail}" ) % { file : Puppet [ :classfile ] , detail : detail } end
Store the classes in the classfile.
Store the classes in the classfile .
# classfile paths may contain UTF-8 # https://puppet.com/docs/puppet/latest/configuration.html#classfile