Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-11348

Remove Windows ENV patches on Ruby 3

    XMLWordPrintable

Details

    • Improvement
    • Status: Needs Information
    • Normal
    • Resolution: Unresolved
    • None
    • PUP 8.0.0
    • None
    • None
    • Phoenix
    • 5
    • Needs Assessment

    Description

      Ruby on Windows now stores environment variables and values as UTF-8, see https://bugs.ruby-lang.org/issues/9715#note-8 so we should be able to remove the various monkey patches and workarounds in puppet, such as Puppet::Util.get_env
       
      Puppet should be able to:

      • manage registry entries with non-ascii characters
         
      • manage users with umlat, C:\Users\Jöhn
         
      • execute process with non-ascii in the command line as a non-ascii user
         
      • get/set environment variables with rune characters: https://bugs.ruby-lang.org/issues/8822#note-6

      See related info in :

      https://tickets.puppetlabs.com/browse/PUP-5726?focusedCommentId=261201&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-261201

      https://tickets.puppetlabs.com/browse/PUP-5768?focusedCommentId=273221&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-273221

      And

      	exec { 'tomcat-configure-service':
      		command  => "powershell.exe Get-ChildItem Env:",
      		onlyif   => 'powershell.exe exit 0',      
      		provider => windows,
      		logoutput => true,
      		#notify => $tomcat_service,
      		tag      => 'tomcat-configure-service',
      	}
      

      set USERNAME=Jöhn
      set USERPROFILE=C:\Users\Jöhn
      C:\> puppet apply manifests\bug_swedish_userprofile.pp --test
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              josh Josh Cooper
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Zendesk Support