Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-3588

Document the best way to handle exit codes in ps1 scripts

    XMLWordPrintable

Details

    • Hide

      Documentation added to README
      Code examples added
      Sign off from Docs

      Show
      Documentation added to README Code examples added Sign off from Docs
    • 1
    • Windows 2016-09-07

    Description

      Because of the way Powershell sets $LASTEXITCODE and $? and the somewhat confusing differences between the two. It is probably a good idea to add some documentation in the powershell module to explain the best way tell Puppet weather a script that you have run has succeeded or failed, both for the purposes of running scripts with an exec, or using that script with onlyif or unless.

      ethan Probably has more idea of how to explain this than I do as he wrote the code and fixed MODULES-3399 which brought up this issue.

      Attachments

        Issue Links

          Activity

            People

              ethan Ethan Brown
              dylan.ratcliffe Dylan Ratcliffe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support