We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a54bd23 commit 646db24Copy full SHA for 646db24
1 file changed
tests/outputEnumOnlyTestRepo/outputs/module/PSModuleEnumOnly/PSModuleEnumOnly.psm1
@@ -36,8 +36,11 @@ foreach ($Type in $ExportableClasses) {
36
}
37
38
$MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
39
+ $CurrentTypeAccelerators = $TypeAcceleratorsClass::Get
40
foreach ($Type in ($ExportableEnums + $ExportableClasses)) {
- $null = $TypeAcceleratorsClass::Remove($Type.FullName)
41
+ if ($CurrentTypeAccelerators[$Type.FullName] -eq $Type) {
42
+ $null = $TypeAcceleratorsClass::Remove($Type.FullName)
43
+ }
44
45
}.GetNewClosure()
46
#endregion Class exporter
0 commit comments