795de73d31
`Compiler.LoadModule` assumes that when `ps.HadErrors == true` the error stream is not empty. However, when `SilentlyContinue` is specified as the error action, the non-terminating error is not kept in `ErrorOutputPipe` of the cmdlet and thus does not appear in `ps.Streams.Error`. So when `ps.HadErrors == true` while `ps.Streams.Error` is empty, it suggests it's OK to ignore the errors because they are explicitly suppressed with `SilentlyContinue` error action. So in my opinion, the expected behavior of `"using module .\mod.psm1"` in this case should be successful as if `ps.HaddErrors` is false. |
||
---|---|---|
.. | ||
MSFT_778492.psm1 | ||
ProtectedAccess.Tests.ps1 | ||
Scripting.Classes.Attributes.Tests.ps1 | ||
Scripting.Classes.BasicParsing.Tests.ps1 | ||
Scripting.Classes.Break.Tests.ps1 | ||
Scripting.Classes.Exceptions.Tests.ps1 | ||
scripting.Classes.inheritance.tests.ps1 | ||
Scripting.Classes.MiscOps.Tests.ps1 | ||
Scripting.Classes.Modules.Tests.ps1 | ||
scripting.Classes.NestedModules.tests.ps1 | ||
Scripting.Classes.RunPath.Tests.ps1 | ||
Scripting.Classes.StaticMethod.Tests.ps1 | ||
scripting.Classes.using.tests.ps1 | ||
scripting.enums.tests.ps1 |