msft:8027609 Get-Module -List and Test-ModuleManifest import the the nested module dependencies into the current/global runspace.

This commit is contained in:
Chunqing Chen
2016-07-14 12:42:47 -07:00
parent 7033dc31f1
commit bd0ba6771c
2 changed files with 9 additions and 6 deletions
@@ -652,7 +652,11 @@ namespace Microsoft.PowerShell.Commands
else if (Directory.Exists(rootedPath))
{
// Load the latest valid version if it is a multi-version module directory
foundModule = LoadUsingMultiVersionModuleBase(rootedPath, importModuleOptions, out found);
foundModule = LoadUsingMultiVersionModuleBase(rootedPath,
ManifestProcessingFlags.LoadElements |
ManifestProcessingFlags.WriteErrors |
ManifestProcessingFlags.NullOnFirstError,
importModuleOptions, out found);
if (!found)
{