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

Custom MSI Action will not log STDERR to MSI log

    Details

    • Template:
    • Acceptance Criteria:
      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
    • Team:
      Night's Watch
    • Story Points:
      1
    • Sprint:
      PR - 2019-06-12, PR - 2019-06-25, PR - 2019-07-10
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Correctly log STDERR in MSI installer log
    • QA Risk Assessment:
      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

            jsd-sla-details-panel

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support