Skip to content

Commit 1cc16b5

Browse files
committed
trap AnyCPU error
1 parent 66ab516 commit 1cc16b5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

nuget/tools/install-AnyCPU.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,13 @@ foreach ($p in $platforms)
104104
{
105105
$hasPlatform = HasPlatform $manager $p
106106
if(-not $hasPlatform)
107-
{
108-
[void]$manager.AddPlatform($p, "Any CPU", $true)
109-
trap [Exception] {
110-
Write-Host($error[0])
107+
{
108+
trap [Exception]
109+
{
111110
continue
112111
}
112+
113+
[void]$manager.AddPlatform($p, "Any CPU", $true)
113114
}
114115
}
115116

0 commit comments

Comments
 (0)