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

PowerShell - Add cross-platform support

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: powershell
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      • Full module acceptance suite runs / passes against Linux and OSX
    • Team:
      Modules
    • QA Risk Assessment:
      Automate

      Description

      With PowerShell v6 able to run on OSX / Linux, the module can be expanded so that it works on non-Windows platforms.

      Much of the initial work has been done as part of MODULES-3690 to move away from OS specific code. However, some work remains to make adjustments to the PowerShell code and some of the Ruby pipe code to ensure that the module can execute code on these platforms.

      A couple of issues that I've come across:

      • When PowerShell calls Add-Type, openssl must be in the load path for the underlying call to csc.exe to work properly. Some info on this problem is at https://github.com/dotnet/cli/issues/3964 (I've been able to workaround that problem with export DYLD_LIBRARY_PATH=/usr/local/opt/openssl/lib)
      • Add-Type behaves differently on OSX than Windows - and looks to drag in the wrong assemblies. Most of the custom code will compile by adding additional -ReferenceAssemblies to the Add-Type call, but 6.0 alpha 11 should feature some additional fixes - see the PowerShell issue https://github.com/PowerShell/PowerShell/issues/1616 for more details, and a similar issue / response in Roslyn issue tracker - https://github.com/dotnet/roslyn/issues/13267

      With some minor modifications, I have been able to reduce the errors down to https://gist.github.com/Iristyle/cbf1626e092683e8f578b7ccdddae7c3

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              ethan Ethan Brown
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support