Skip to content

Commit 2bfef2b

Browse files
fix: type check for array (#413)
# Pull Request ## Issue #412 ## Description Type check for array not working in all circumstances. Adding check for generic list ## License By submitting this pull request, I confirm that my contribution is made under the terms of the projects associated license.
1 parent 88593d2 commit 2bfef2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ALZ/Private/Config-Helpers/Set-Config.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function Set-Config {
6060
# Handle integer index for arrays
6161
Write-Verbose "Handling integer index for array"
6262

63-
if(!$inputConfigItemValueType.EndsWith("[]")) {
63+
if(!$inputConfigItemValueType.EndsWith("[]") -and !$inputConfigItemValueType.StartsWith("System.Collections.Generic.List")) {
6464
Write-Error "Input config item $($inputConfigName) is not an array, but an index was specified."
6565
throw "Input config item $($inputConfigName) is not an array, but an index was specified."
6666
}

0 commit comments

Comments
 (0)