Uploaded image for project: 'Puppet Agent'
  1. Puppet Agent
  2. PA-2691

Custom MSI Action will not log STDERR to MSI log

    XMLWordPrintable

Details

    • Hide
      • Manual test
        Errors while running takeown etc., that are written to STDERR, should appear in the MSI log
      Show
      Manual test Errors while running takeown etc., that are written to STDERR, should appear in the MSI log
    • Night's Watch
    • 1
    • PR - 2019-06-12, PR - 2019-06-25, PR - 2019-07-10
    • Needs Assessment
    • Bug Fix
    • Correctly log STDERR in MSI installer log
    • Needs Assessment

    Description

      In https://github.com/puppetlabs/puppet-agent/blob/e1a9b7d4b13ec4504d1fcbf70be1b42fbf2cff1a/resources/windows/wix/customactions.wxs.erb the ExecuteCommand function is supposed to redirect STDERR to STDOUT, which then logs to a file. However the order of the redirection is incorrect

      Line https://github.com/puppetlabs/puppet-agent/blob/e1a9b7d4b13ec4504d1fcbf70be1b42fbf2cff1a/resources/windows/wix/customactions.wxs.erb#L340

      Should be:

      Dim exitCode : exitCode = wshShell.Run(Command & " > """ & tempFilePath & """ 2>&1 > ", 0, True)
      

      The STDERR redirection must come after the file redirection.

      Attachments

        Activity

          People

            gabriel.nagy Gabriel Nagy
            glenn.sarti Glenn Sarti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support