Replaces the improper positional parameter $findModuleParams with a splat
Description
Replaces an improper positional parameter with a splat.
Motivation and Context
Fixes #74
Testing
Force imported the module from source and re-ran. The Find-Module no longer fails due to an unhandled positional parameter error, but now fails due to insufficient logic to handle wildcard requests. Wildcard module handling is not covered by the existing logic, but will be in my upcoming pull request.
PS C:\git\aws-tools-for-powershell\modules\Installer> Import-Module .\AWS.Tools.Installer.psd1 -Force
PS C:\git\aws-tools-for-powershell\modules\Installer> Install-AWSToolsModule -Name 'AWS.Tools.*' -Verbose
VERBOSE: [Install-AWSToolsModule] ConfirmPreference=High WhatIfPreference=False VerbosePreference=Continue Force=False
VERBOSE: [Get-AvailableModuleVersion] ConfirmPreference=High WhatIfPreference=False VerbosePreference=Continue Force=False
VERBOSE: [Get-AvailableModuleVersion] Found multiple modules versions: 1.0.0.0, 4.0.0.0.)
Find-Module : The RequiredVersion, MinimumVersion, MaximumVersion, AllVersions or AllowPrerelease parameters are allowed only when you specify a single name as the value of the Name parameter, without any wildcard characters.
At C:\git\aws-tools-for-powershell\modules\Installer\AWS.Tools.Installer.psm1:250 char:54
+ ... orEach-Object { Find-Module -Name $_ @findModuleParams @proxyParams }
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Find-Module], ArgumentException
+ FullyQualifiedErrorId : VersionParametersAreAllowedOnlyWithSingleName,Find-Module
Screenshots (if appropriate)
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
[x] My code follows the code style of this project
[ ] My change requires a change to the documentation
[ ] I have updated the documentation accordingly
[x] I have read the README document
[ ] I have added tests to cover my changes
[x] All new and existing tests passed
License
[x] I confirm that this pull request can be released under the Apache 2 license
Replaces the improper positional parameter $findModuleParams with a splat
Description
Replaces an improper positional parameter with a splat.
Motivation and Context
Fixes #74
Testing
Force imported the module from source and re-ran. The
Find-Module
no longer fails due to an unhandled positional parameter error, but now fails due to insufficient logic to handle wildcard requests. Wildcard module handling is not covered by the existing logic, but will be in my upcoming pull request.Screenshots (if appropriate)
Types of changes
Checklist
License