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

Add searching for pwsh in the PowerShell module

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: powershell
    • Labels:
    • Template:
    • Acceptance Criteria:
      Hide
      • Can find pwsh in default locations on operating systems
      • Can find pwsh on the search path
      • Can find pwsh is specified by path =>
      • Uses the found pwsh binary
      • Documentation for how the path is searched and can be specified.

      Acceptance test (or integration if we can get away with it).

      Show
      Can find pwsh in default locations on operating systems Can find pwsh on the search path Can find pwsh is specified by path => Uses the found pwsh binary Documentation for how the path is searched and can be specified. Acceptance test (or integration if we can get away with it).
    • Team:
      Windows
    • Story Points:
      1
    • Sprint:
      Windows 2019-01-23, Windows 2019-01-30, Windows 2019-02-06, Windows 2019-02-13
    • QA Risk Assessment:
      Needs Assessment

      Description

      In order to support PowerShell core we need to be able to dynamically search for the pwsh binary.

      pwsh does have some default locations;
      https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-windows?view=powershell-6

      https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-macos?view=powershell-6

      However it could also be installed anywhere manually

      This ticket will track the work make sure the path can be discovered dynamically in the default locations, but also from the path

      e.g.

      exec { 'do something':
         command  => 'Write-Host $PSVersionTable',
          path     => 'C:\Program Files\PowerShell\6.1',
         provider => pwsh,
         require  => File['testfile'],
      }
      

      This will also include some acceptance or unit tests for this behaviour. This should also be supported cross platform

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ethan Ethan Brown
              Reporter:
              glenn.sarti Glenn Sarti
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support