SharpeRAD / Cake.Powershell

Powershell addin for Cake
http://cakebuild.net
MIT License
83 stars 36 forks source link

Use modules in powershell is not working #14

Closed franreyes closed 7 years ago

franreyes commented 7 years ago

When Module is loaded show this error:

The specified module 'System.Collections.Generic.List1[System.String]' was not loaded because no valid module file was found in any module directory.

I think that problem is this line in PowershellRunner:

pipeline.Commands.AddScript("Import-Module " + settings.Modules);

Should be like this:

settings.Modules.ToList()
      .ForEach(m => pipeline.Commands.AddScript("Import-Module " + m));
SharpeRAD commented 7 years ago

Good catch, publishing a fix now 👍