Skip to content

Commit

Permalink
Merge pull request Azure#6440 from bmoore-msft/cicd
Browse files Browse the repository at this point in the history
fix min/max type check
  • Loading branch information
bmoore-msft authored Aug 21, 2019
2 parents e0729b9 + 76d34f6 commit dd0ccb3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ foreach ($parameterInfo in $templateObject.parameters.psobject.properties) {
$Min = $null
$Max = $null
if ($parameter.psobject.properties.item('maxValue')) {
if ($parameter.maxValue -isnot [int]) {
if ($parameter.maxValue -isnot [long]) { # PS Core is interpreting the int/longs as long
Write-Error "$($ParameterName) maxValue is not an [int] (it's a [$($parameter.maxValue.GetType())])" `
-ErrorId Parameter.Max.Not.Int -TargetObject $parameter
} else {
Expand All @@ -20,7 +20,7 @@ foreach ($parameterInfo in $templateObject.parameters.psobject.properties) {

}
if ($parameter.psobject.properties.item('minValue')) {
if ($parameter.minValue -isnot [int]) {
if ($parameter.minValue -isnot [long]) {
Write-Error "$($ParameterName) minValue is not an [int] (it's a [$($parameter.minValue.GetType())])" `
-ErrorId Parameter.Max.Not.Int -TargetObject $parameter
} else {
Expand Down

0 comments on commit dd0ccb3

Please sign in to comment.