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

PowerShell - Add cross-platform support



    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • None
    • powershell
    • None
      • Full module acceptance suite runs / passes against Linux and OSX
    • Modules
    • Automate


      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


        Issue Links



              Unassigned Unassigned
              ethan Ethan Brown
              0 Vote for this issue
              3 Start watching this issue



                Zendesk Support