Skip to content

Fix error message if -AssemblyName with wildcard is not found using Add-Type - #7444

Merged
Dongbo Wang (daxian-dbw) merged 3 commits into
PowerShell:masterfrom
SteveL-MSFT:addtype-notfound-assembly
Aug 6, 2018
Merged

Dongbo Wang (daxian-dbw) merged 3 commits into
PowerShell:masterfrom
SteveL-MSFT:addtype-notfound-assembly

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Aug 3, 2018 •

Copy link
Copy Markdown
Member

PR Summary

The current code expects a positive result so it tries to index into an empty list. Fix is to check if the count is greater than 0 before indexing into it.

PR Checklist

@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 36dc96a into PowerShell:master Aug 6, 2018
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the addtype-notfound-assembly branch August 7, 2018 22:39
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants