Skip to content

Commit f087279

Browse files
committed
comment out type accelerator exception
1 parent cfa5e96 commit f087279

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Modules/PassPushPosh/1.3.2/PassPushPosh.psm1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class PasswordPush {
6060
$ExportableTypes =@(
6161
[PasswordPush]
6262
)
63-
# Get the internal TypeAccelerators class to use its static methods.
63+
<## Get the internal TypeAccelerators class to use its static methods.
6464
$TypeAcceleratorsClass = [psobject].Assembly.GetType(
6565
'System.Management.Automation.TypeAccelerators'
6666
)
@@ -81,10 +81,12 @@ foreach ($Type in $ExportableTypes) {
8181
$Type.FullName
8282
)
8383
}
84-
}
84+
}#>
8585
# Add type accelerators for every exportable type.
8686
foreach ($Type in $ExportableTypes) {
87+
try {
8788
$TypeAcceleratorsClass::Add($Type.FullName, $Type)
89+
} catch {}
8890
}
8991
# Remove type accelerators when the module is removed.
9092
($MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {

0 commit comments

Comments
 (0)