Skip to content
Prev Previous commit
Next Next commit
use build pattern for less repeated code
  • Loading branch information
bergmeister committed Apr 15, 2019
commit 1528e99a92368d20d8bb736f934dfd788bff2d56
6 changes: 3 additions & 3 deletions Engine/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ public PSModuleInfo GetModuleManifest(string filePath, out IEnumerable<ErrorReco
using (var ps = System.Management.Automation.PowerShell.Create())
{
ps.RunspacePool = _runSpacePool;
ps.AddCommand("Test-ModuleManifest");
ps.AddParameter("Path", filePath);
ps.AddParameter("WarningAction", ActionPreference.SilentlyContinue);
ps.AddCommand("Test-ModuleManifest")
.AddParameter("Path", filePath)
.AddParameter("WarningAction", ActionPreference.SilentlyContinue);
try
{
psObj = ps.Invoke();
Expand Down